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.

Deleting List by C# Library

SOLVED
Go to solution
Highlighted
Occasional Contributor

Deleting List by C# Library

Hi

 

I am trying to delete a contact list added by C# library, when i try to delete it i got exception " The remote server returned an error: (403) Forbidden."  but if i try to delete a contact list added from  Constant contact it gets deleted, can you let me know what is the issue ? waiting for your reply,

 

regards,
 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Deleting List by C# Library

There are two reasons why you would receive a 403 error when deleting a list, one far more likely than the other:

 

1 - This is the most likely reason, you are trying to delete a list that is marked as "Default List", which means that the OptInDefault node is set to True.  In order to delete a Default List, you must set it to no longer be a default list and then you can delete it

 

2 - This is unlikely since you are using our library, you are trying to delete a list for someone elses account.  This normally means that you have put the incorrect username into the URI when building the request.  Since you are using the C# library, this is highly unlikely to be the case, but worth mentioning that this can result in a 403.

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

1 REPLY 1
Highlighted
Moderator

Re: Deleting List by C# Library

There are two reasons why you would receive a 403 error when deleting a list, one far more likely than the other:

 

1 - This is the most likely reason, you are trying to delete a list that is marked as "Default List", which means that the OptInDefault node is set to True.  In order to delete a Default List, you must set it to no longer be a default list and then you can delete it

 

2 - This is unlikely since you are using our library, you are trying to delete a list for someone elses account.  This normally means that you have put the incorrect username into the URI when building the request.  Since you are using the C# library, this is highly unlikely to be the case, but worth mentioning that this can result in a 403.

Dave Berard
Senior Product Manager, Constant Contact

View solution in original post

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