please help, i am getting error, trying to generate access token.
dont worried about my api_key and secret key, i just have test information.
this is the error message:
{"error":"unauthorized_client"}
import requests as r
import base64
client_id = "8b89ccfc-1003-4ab5-8200-8307aa43e7d4"
client_secret = "[redacted for security]"
auth_url = "https://idfed.constantcontact.com/as/token.oauth2?grant_type=client_credentials"
client_id_secret = "{client_id}:{client_secret}".format(client_id,client_secret).encode("utf-8")
basic_auth = base64.b64encode(client_id_secret).decode("utf-8")
headers = {
"Authorization": "Basic " + basic_auth,
"Content-Type": "application/x-www-form-urlencoded",
}
response = r.post(auth_url, headers=headers)
print(response.text)
... View more