ActiveCampaign Forum

API call returns "you are not authorized" despite admin status and correct api_key


#1

The code I’m using is

# import json
# headers = {'api_key': 'api from dev tag',
#             'email':'customer email',
#             'api_output':'json'}
# r = requests.get('https://gazette.api-us1.com/admin/api.php?api_action=contact_view_email', headers=headers)
# #return_string=json.loads(r.text)
# print(r.text)```

Any idea what could be causing the response?