Deleting List by C# Library

SOLVED
Go to solution
tippua
Occasional Participant

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
DaveBerard
Moderator

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
DaveBerard
Moderator

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