I'm following the OAuth2 Authorization Code Flow on CC API v3 to get my access and refresh token. However on step 4 I only get the access token. The refresh token is missing. Why?. Here's the response:
Solved! Go to Solution.
The solution: I re-read the API Server Flow Guide and saw something mentioned that i did not include in my initial attempt: -- you MUST add "offline_access" to the scope to get the refresh token: Here it the paragraph from the doc:
scope — The type of data in Constant Contact that the user is granting your application permission to use. The offline_access scope is required to get a refresh token.
I, too, have the same issue as TACmarketing. It makes not difference if the application is configured as "rotating refresh tokens" or "long lived refresh tokens". Below is a screen shot of the JSON representation of the POST response
The solution: I re-read the API Server Flow Guide and saw something mentioned that i did not include in my initial attempt: -- you MUST add "offline_access" to the scope to get the refresh token: Here it the paragraph from the doc:
scope — The type of data in Constant Contact that the user is granting your application permission to use. The offline_access scope is required to get a refresh token.
Thank you JosePhineo. I missed it too.
Hello TACmarketing,
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.
It looks like @josephineo already came up with the solution in an above comment but based on your response, it looks like the only scope included in your authentication request was the
“contact_data” scope. In order to obtain a refresh token the “offline_access” scope must also be included in the request. Below I am including the overview documentation for our available OAuth 2.0 flows.
OAuth 2.0 Overview:
https://developer.constantcontact.com/api_guide/auth_overview.html
Please have a look and let us know if you have any other questions!
Regards,
Announcements
Join our list to be notified of new features and updates to our V3 API.
Sign Up