getCampaign is returning a forbidden 403 code

Highlighted
Retail

getCampaign is returning a forbidden 403 code

I have been trying to get the email content from each individual campaign to store in our database. I have the correct Access_token as I am using it to pull all the ids for all the campaigns. My id is also in int format. Here is some sample code below:

 

foreach ($newsletter_content_list as $newsletter){
	
$id = (int)$newsletter;
$content = $client->emailMarketingService->getCampaign(ACCESS_TOKEN,$id); $email_content = $content->email_content; $conn->query("INSERT INTO newsletters (newsletter_content) VALUES('".$email_content."')"); } $conn->close();

 The code always returns 

 

Ctct\Services\EmailMarketingService->getCampaign('b120d72f-9e3a-4...', 1110909623002)
#2 {main}
Forbidden (code 403)

Any help or pointers would be appreciated.

 

Happy Holidays 

2 REPLIES 2
Highlighted
CTCT Employee

Re: getCampaign is returning a forbidden 403 code

Hi,

 

Sorry to hear about the trouble. I'd like to reporoduce the issue on my side so that I can see the error message body and troubleshoot. Would you mind emailing us at webservices@constantcontact.com with the access token being used, along with a link to this post for reference?

 

Thanks in advance!

 

Best Regards,

Shannon Wallace

Partner API Support Engineer

Highlighted
Retail

Re: getCampaign is returning a forbidden 403 code

I just sent you guys an email with the required information.

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured