We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Error when getting lists


Error when getting lists

Fatal error: Uncaught exception 'Ctct\Exceptions\CtctException' with message 'Unauthorized' in /home/sajidhussainnn/public_html/cc/vendor/constantcontact/constantcontact/src/Ctct/Services/BaseService.php:78 Stack trace: #0 /home/sajidhussainnn/public_html/cc/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php(42): Ctct\Services\BaseService->convertException(Object(GuzzleHttp\Exception\ClientException)) #1 /home/sajidhussainnn/public_html/app2.php(33): Ctct\Services\ListService->getLists('[Redacted]') #2 {main} thrown in/home/sajidhussainnn/public_html/cc/vendor/constantcontact/constantcontact/src/Ctct/Services/BaseService.php on line 78




Just to let you know your original post was edited to remove sensitive information.


In general if you get an error message "unauthorized" you are dealing with an incorrect API key, access token, or the Constant Contact you are connecting with does not have the access level that is needed to perform the function you are trying to do.


Since you are just trying to get lists I would lean more towards the API key and/or Access Token are not being submitted correctly. However I would be able to help better if I could see a snippet of the code you are submitting to get this error. I highly suggest to send an email to webservices@constantcontact.com with the details that way we do not have to worry about sensitive information being on a public location.

Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page