Skip to content

Instantly share code, notes, and snippets.

@linkerzx
Last active October 11, 2018 20:00
Show Gist options
  • Save linkerzx/1af2272a42493827e04da7be4152c371 to your computer and use it in GitHub Desktop.
Save linkerzx/1af2272a42493827e04da7be4152c371 to your computer and use it in GitHub Desktop.
def auth(clientId: str,
clientSecret: str
) -> requests.Response:
end_point = "https://auth.exacttargetapis.com/v1" + "/requestToken"
headers = {'Content-type': 'application/json'}
payload = {
"clientId": clientId,
"clientSecret": clientSecret,
"accessType": "offline"
}
req = requests.post(
end_point,
headers=headers,
data=json.dumps(payload)
)
return req
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment