V3 API Wordpress Integration

0 Votes

I am trying to integrate v3 API on my website I was able to get it working on my localhost

i have a custom php template in wordpress I am having a difficult time trying to figure out

1)how can I generate the code on the server as I want the code to be generated automatically without me clicking on the generated url

2)also generate auth token automatically 

0 Votes

Hi @user984091,


You do not have to generate an authentication code more than once. Once you get the Access/Refresh Token for the first time I suggest you store that so it can be accessed when you need it to make an API call. You can then use the Refresh Token as needed to generated a new Access/Refresh Token and replace those with your original set that you stored.

Jimmy D.
Tier II API Support Engineer
0 Votes

I have had the same issue saving the refresh token such that it does not expire to solve this you need to make table in db save the token then  setup a cronjob for every hour to refresh the token use system cron instead of wordpress as it will be a little more relaible if you have diffculties you can follow this guide https://www.wpscreators.com/simple-wordpress-custom-constant-contact-api/ 

Developer Portal

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

Visit Page


API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up

How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (66%)