How to Connect to Other Alli APIs from Within an App Execution
Alli has quite a few APIs and an app execution can communicate with them using a few environment variables:
ALLI_OAUTH_TOKEN
ALLI_OAUTH_TOKEN_TYPE
Both can be used in the Authorization
header of HTTP request to communicate with an Alli API. For example:
import os
import requests
token = os.environ['ALLI_OAUTH_TOKEN']
token_type = os.environ['ALLI_OAUTH_TOKEN_TYPE']
resp = requests.get("https://api.central.alliplatform.com/me", headers={
'Authorization': f'{token_type} {token}',
})
print(resp)