HTTP/1.1 405 Method Not Allowed

SOLVED
Go to solution
Frequent Participant

HTTP/1.1 405 Method Not Allowed

Hello

 

I send the Modify a contact with a specific Contact ID API v2 endpoints. It works. I am able to modify the contact. Specifically I am adding a campaign to the list in the contact. After I modify the list with the API I can see the contact changing.

 

Now I want to use the API from my web site. So, I try and copy and paste everything possible and try and execute it. I have successfully executed an API to add a new contact.

 

The URL for the add contact is https://api.constantcontact.com/v2/contacts?action_by=ACTION_BY_VISITOR&api_key=$apiKey.

This is the working API.

 

The URL for the Modify a contact with a specific Contact ID is https://api.constantcontact.com/v2/contacts/$contactId?action_by=ACTION_BY_OWNER&api_key=$apiKey

is the URL where it doesn't.

 

I use a php/curl program in my web site. I traced the curl execution. That is where the HTTP/1.1 405 Method Not Allowed was discovered. What I think after the reading the curl trace is that data is sent to Constant Contact. The trace shows 1381 bytes received at Constant Contact. Then the Curl trace shows We are completely uploaded and fine assuming that the 1381 bytes is ok. I think Constant Contact got the data and didn't like it. Any ideas, seen this before?

 

I sent the actual API's and trace data to Webservices.

1 ACCEPTED SOLUTION
Frequent Participant

Thanks, all fixed.

View solution in original post

2 REPLIES 2
Moderator

Hi @LarryV375,

 

I reviewed the files sent and it appears you are trying to do a POST to the endpoint /v2/contacts/{contactID} and this endpoint should be a PUT instead.


Regards,
Jimmy D.
Tier II API Support Engineer
Frequent Participant

Thanks, all fixed.

View solution in original post

Developer Portal

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

Visit Page