cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about the ERR_403_DEVELOPER_INACTIVE error code

All Star

Questions about the ERR_403_DEVELOPER_INACTIVE error code

I'm trying to create a simple GET procedure in ColdFusion to get information about an individual contact, as specified here in the API. But I keep running into a ERR_403_DEVELOPER_INACTIVE error code. My account is certainly active, I checked, so this seems weird to me. I can only assume I'm passing the wrong variables or something? A GET for an individual contact only needs the api_key and the contactId, right?

 

I've attached the code that I've made so you can look at it if you need to

EDIT: Attachment Removed

 

Thanks!

8 REPLIES 8
Moderator

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hello,

 

Thank you for reaching out to Constant Contact API Support.

 

I can verify that your API Key is active and working. When entering in the information into our API Tester (https://constantcontact.mashery.com/io-docs) I was able to successfully test the specific method for this contact in your account. I was not able to locate any attempts (successful or failed) within the last week on that account or key aside from my own tests just now. Is this the information you are using when you see this error?

 

Feel free to email webservices@constantcontact.com for privacy if you are using a different API Key and/or access token.

 

Sincerely,
David B.
API Technical Support Specialist

All Star

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hi,

 

Yes, I am using exactly that key and token. If there aren;t any attempts logged, could that mean that it's a different problem entirely?

Moderator

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hello,

 

Upon further review of your code, I found that you are "setting" the api key and access token, but not actually appending them to the request. 

 

You will need to add the API Key to the request URL following this format: ?api_key={XXXXXXXXXXX}

 

You will also need to add the access token as a header. Here's some information about setting a header in ColdFusion: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d85.html

 

If you are not able to set a header, you will have to put the access token on the URL as well, however this is not the most secure since we log request URLs.

 

Also, I have removed your example file as it contained an API Key and Access Token which could be used to access your account. Feel free to email webservices@constantcontact.com in the future with any code samples that contain this type of information to avoid posting it publicly.

 

If you have any other questions, please let me know!

 

Sincerely,
David B.
API Technical Support Specialist

All Star

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Thanks, I've added the "?api_key=XXXXXXXXXXX" to the url and created a cfhttpparam tag that puts the access token in the header (It looks something like:)

 

<cfhttpparam name="access_token" type="header" value="XXXXXXX">

 

That seemed to fix the problem with the 403 Developer Inactive error, but now I'm getting a 401 Unauthorized error. Is there something else I need to put in the header as well?

 

Moderator

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hello,

 

It looks like you're on the right track. The reason you are now getting 401 errors is that you need the access token header to be in Bearer token format as shown here:

http://developer.constantcontact.com/docs/authentication/oauth-2.0-client-flow.html

 

So for example, your header would be written like this:

<cfhttpparam name="access_token" type="header" value="Authorization: Bearer XXXXXXX">

 

Sincerely,
David B.
API Support Specialist

Highlighted
All Star

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hi,

 

I still seem to get a 401 Error when using that bearer token format. It does seem to work if I put the key directly in the url, so I guess it's still just a formatting issue?

Moderator

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

Hello,

 

It may be a formatting issue, but I'd need to see your complete request to know for sure.

 

So that I can troubleshoot this for you further in complete detail, please send an email containing a snippet of your current code to webservices@constantcontact.com.

 

Sincerely,
David B.
API Technical Support Specialist

Honored Contributor

Re: Questions about the ERR_403_DEVELOPER_INACTIVE error code

It turns out that when I was originally working with David on this, I misinterpreted the documentation around how it generates headers. The correct format for setting headers is:

<cfhttpparam type="header" name="HeaderName" value="HeaderValue" > 

Using this format, this is how you would format for setting an Access Token:

<cfhttpparam type="header" name="Authorization" value="Bearer YOUR_ACCESS_TOKEN" > 

If you run into any further issues, please let us know!

 

Sincerely,

Elijah G.
API Support Engineer