Struggling with error: The Mashery account associated with this request is not active, or an invalid

SOLVED
Highlighted
Occasional Contributor

Struggling with error: The Mashery account associated with this request is not active, or an invalid

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.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Struggling with error: The Mashery account associated with this request is not active, or an inv

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.


Regards,
Jimmy D.
Tier II API Support Engineer

View solution in original post

Tags (1)
1 REPLY 1
Highlighted
Moderator

Re: Struggling with error: The Mashery account associated with this request is not active, or an inv

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.


Regards,
Jimmy D.
Tier II API Support Engineer

View solution in original post

Tags (1)
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Register for our "Making Sense of Online Marketing for Retail" Webinar

Join us on Thursday, August 13th at 2pm ET for a free webinar where we'll discuss how to incorporate online marketing into your retail store.

Read More
Featured