My code is here and is fairly standard:
headers = { "Authorization": "Bearer xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxx", "X-Originating-IP": "###.##.##.###", "Content-Type": "application/json" } data = urllib.parse.urlencode({ # Request parameters 'status': 'ACTIVE', 'limit': 500, }) constantContactURL = "https://api.constantcontact.com/v2/contacts?status=ACTIVE&limit=500&api-key=X" constantContactData = s.get(constantContactURL, headers=headers)
I believe I'm passing the correct API Key and token, but I'm still getting:
The Mashery account associated with this request is not active, or an invalid API key was used.
The API Key and token both work in the test console on the Constant Contact API web portal, so I just can't understand what's happening with my code.
Solved! Go to Solution.
Hi @IrishArts,
Thank you for reaching out to Constant Contact's API Support.
I hope this is a simple solution. Based on what you posted it looks like a syntax error. Your parameter for the API Key looks incorrect. You have api-key and it should be api_key.
Hi @IrishArts,
Thank you for reaching out to Constant Contact's API Support.
I hope this is a simple solution. Based on what you posted it looks like a syntax error. Your parameter for the API Key looks incorrect. You have api-key and it should be api_key.
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article