cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving Campaign Id's for multiple sites

SOLVED
Highlighted
Occasional Contributor

Retrieving Campaign Id's for multiple sites

Hello,

We have multiple accounts with Constant Contact.  I have a program that needs to get Campaign infomation for each of our sites.

I was successful obtaining the API Key and Access token, for our first site. When I run I get the list of Campaign Ids.

Please let me know if I am doing this correctly for the next site: (?)
So I registered the APP again, I listed the new Company Name, I put in the company website and gave a discription.
It created the needed Key, and I got an Access token to run test API:

But instead of returning a list of campaign ids, I got this returned:

{
   
"meta": {
       
"pagination": {}
   
},
   
"results": []
}

I am assuming i did something wrong. Perhaps when signing in to create the app to get the key I should be signing with the specific sites username and password?  But I didn't have to for the first site. How does registering the app and giving a key know which site to pull the information from? I think I am missing something.

thanks

2 REPLIES 2
New Member

Re: Retrieving Campaign Id's for multiple sites

I think I may have found the issue. When retrieveing an Access Token, I needed to use the sign in user name and password of the site requesting the information in the app.  As I am signed in with them now, and it is showing jonathan as answering this post.

Honored Contributor

Re: Retrieving Campaign Id's for multiple sites

Hello,

 

You've got it exactly correct that in order to get access tokens for a given account, you need to use the credentials for that account to log in. This binds to token to that Constant Contact account.

 

In addition, our forums are linked to Constant Contact accounts, so logging into another account to generate a token will also log in to the forums as that account. If you ever need to switch accounts, the easiest way is to go into the Constant Contact account proper and simply log out.

 

Sincerely,

Elijah G.
API Support Engineer