Got a 'How do I' question? Join our live 'Ask a Trainer' session happening now for instant help and pro tips!

C# V3 API Questions

0 Votes

Good morning,


My goal is to automatically add a contact to constant contact once a user signs up for an account.


With that being said I have seen a couple of examples on support about the C# V3 API. They all start with something along the lines of an authorization code.

Which is the one part I am struggling to get. I've created an application and authorized it but I am not sure where that information comes from.


How long is the authorization code valid? Do I need to implement some sort of refresh logic?




0 Votes

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.


To get started with the V3 API, you’ll want to start by going through the V3 API OAuth Server Flow. Please note, after step 1, you should set up step 4 before proceeding, because the authorization code from steps 2 and 3 only has a lifespan of 60 seconds.


V3 API OAuth2.0 Server Flow


Tokens Overview


Once you have your first set of tokens, you’ll want to set the access token and the refresh token as values for corresponding variables in your application, so that when your program runs through step 5 of the OAuth2.0 Server Flow to get the new set of tokens it can assign new values to those variables to maintain an authenticated connection.


You can either have the application refresh the tokens on a timer based on the life of the access token, or you can have each submission check to see if the access token is still active, and then use the refresh token to generate a new set of tokens if not.


V3 API - Refresh the Access Token


How to Make Access Tokens Last Longer


Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
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 (77%)