The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Getting error response 404 when deleting lists.

Highlighted
Solution Provider

Getting error response 404 when deleting lists.

Hi, 

I am trying to delete a contact list. The response object I am getting back is 404 and the text says '[{"error_key":"http.status.not_found","error_message":"No matching resource was found for the supplied URL."}]'

Why is this error being caused? 

Code (python):

headers_deletelist = {

'Authorization': 'Bearer x',
'X-Originating-Ip': 'x',
}


rsp = requests.delete('https://api.constantcontact.com/v2/lists/1?api_key=X', headers = headers_deletelist)
rsp.text

 

Thank you in advance. 

1 REPLY 1
Highlighted
Moderator

Re: Getting error response 404 when deleting lists.

Hello,

 

Thank you for reaching out to the API Support team here at Constant Contact.

 

That error typically means that there is no list with that ID in the account you are calling. If you were to make a GET call to that endpoint (https://api.constantcontact.com/v2/lists/1?api_key=X), do you get a list in response?

 

Regards,
David Bornstein
Tier II API Support Engineer

Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured