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.

Storing the access token on the server side...

Highlighted
Occasional Contributor

Storing the access token on the server side...

I am reading in the documentation that once I have the access token that I should store it on the server side to bypass going through the authentication process again. Could I get a little bit more information about how that might be done? I am using the PHP5 wrapper so my intent is to use the token to handle requests on the server side. Being new to the API I could use some pointers...

3 REPLIES 3
Highlighted
Employee

Re: Storing the access token on the server side...

Hi,

 

We don't have any example scripts to connect to a database or support the database side of it.  You could use a MySQL database to store your access tokens.  Here is a link to more information about getting started with MySQL.

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Occasional Contributor

Re: Storing the access token on the server side...

Alright so I think what you are telling me is to take all the data out of $_SESSION["users"] and store it in a database or perhaps a .php file which will load the session...

Highlighted
Employee

Re: Storing the access token on the server side...

Correct; you will need the username and access token for each account you want to access, in addition to your API Key which will be the same for every user.

 

Best Regards,

Shannon W.

API Support Specialist

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