403 Forbidden from API (Apache error)

Highlighted
Occasional Advisor

403 Forbidden from API (Apache error)

 

I just started getting this kicked back from the API (https://api.constantcontact.com/ws/customers/$login):

 

Title: 403 Forbidden

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /
on this server.</p>
</body></html>

 

Any ideas? Are they blocking us? I verified the API key is active and the login/passwordi s good.

 

16 REPLIES 16
Highlighted
CTCT Employee

Re: 403 Forbidden from API (Apache error)

Hey,

 

I would need to see the rest of your code to see why you are getting a 403.  403 is typically when you are trying to access a different username in your URI and passing a completely different URI as your credential.  Thus you are forbidden to see someone elses data.

 

The other reason why you could get this error is that this is your base URI which would require a "/" at the end.  If you try"../contacts" you should get a successful response if your credentials are correct.

Ryan Davis
Quality Engineer
Highlighted
Occasional Advisor

Re: 403 Forbidden from API (Apache error)

 

That is not the case , something seems to be wrong with my account.

 

When I visit this URL in my browser:

 

http://api.constantcontact.com/ws/customers/$myusernamehere/activities

 

and I try to login with the same exact login/password that works for my normal CC account, it rejects my login.

 

My account was recently reactivated, so it looks like it wasnt re-activated for the API portition. Can you please fix this?

Highlighted
CTCT Employee

Re: 403 Forbidden from API (Apache error)

Hey,

 

Can you provide me with the last 6 characters of your API key so I can see the status of the particular API key that is being used.

Ryan Davis
Quality Engineer
Highlighted
Occasional Advisor

Re: 403 Forbidden from API (Apache error)

Its fad673

 

Thanks for your help

Highlighted
CTCT Employee

Re: 403 Forbidden from API (Apache error)

Hey Gerard,

 

That apikey is currently enabled and I have tested it myself with no issues.

 

 

Ryan Davis
Quality Engineer
Highlighted
Occasional Advisor

Re: 403 Forbidden from API (Apache error)

 

The API key itself is not the problem. The issue is with the actual authentication. When I visit

 

/http://api.constantcontact.com/ws/customers/<my username>

 

and attempt to authenticate, it does not work. The API key is not part of this exchange. If you have access to our account username/password please test thati.

 

Please contact me direct and I will provide you with our constant contact login/password so you can further test.

 

As I mentioned before our account was deactivated and then reactivated. So it seems like this process was not appied to the URL above.

 

Highlighted
CTCT Employee

Re: 403 Forbidden from API (Apache error)

Hey,

 

The apikey has a lot to do with what you are doing as you need to enter the end "/" so

 

https://api.constantcontact.com/ws/customers/<my username>/

 Which will not give you much information back.  The api key is involved as you need to enter your credentials with your APIkey concatenated with your username with a % appended between. 

 

apikey%username

 

Ryan Davis
Quality Engineer
Highlighted
Occasional Advisor

Re: 403 Forbidden from API (Apache error)

The API is protected by basic access authentication (http://en.wikipedia.org/wiki/Basic_access_authentication)

 

I cannot even reach the API because my login details are not authenticated.

 

Please check the login/password database the API is using and re-add my credentials to it.

 

Please contact me off list if you want further detail. Once you replicate my issue you'll see it instantly.

 

 

Highlighted
Occasional Advisor

Re: 403 Forbidden from API (Apache error)

Hello

 

I was able to resolve this issue. Now I'm seeing a new problem.

 

The list IDs that I'm specificying in the API dont seem to match up with the list ID in the webGui

 

For instance, I passed ID 10 via the API, but the list I was actually manipluating is listed as #7 in the WebGUI

 

Please advise.

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured