# Note: you can see details https://docs.alphaus.cloud/v/api-reference/authentication
# Assign generated values for client_id and client_secret
"grant_type": "client_credentials",
"client_id": "{client_id}",
"client_secret": "{client_secret}",
response = requests.post(
url="https://login.alphaus.cloud/ripple/access_token",
except requests.exceptions.RequestException:
print('HTTP Request failed')
return r['access_token'], r["token_type"]
def send_request(type, token):
auth = type + " " + token
response = requests.post(
url="https://api.alphaus.cloud/m/ripple/accts",
"Content-Type": "application/json;",
"account_id": "{account_id}",
"customer_id": "{customer_id}",
"company_id": "{company_id}",
print('Response HTTP Status Code: {status_code}'.format(
status_code=response.status_code))
print('Response HTTP Response Body: {content}'.format(
content=response.content))
except requests.exceptions.RequestException:
print('HTTP Request failed')
access_token, token_type = get_token()
send_request(token_type, access_token)