Got a 'How do I' question? Join 'Ask a Trainer' Monday to Friday, 11am to 4pm ET for instant help and pro tips!

Permission Request screen not showing API V3

ClaudiaT857
Rookie
0 Votes

Hi,

 

I implemented constant contacts OAuth flow and added all the required params and scopes. The scopes I added are campaign_data, offline_access and contact_data. As the documentation suggests we need user to allow offline_access scope in order to get access_token and refresh_token.

 

Request for authorization:

 

https://authz.constantcontact.com/oauth2/default/v1/authorize?response_type=code&client_id={my_client_id}&scope=contact_data%20campaign_data%20offline_access&state=123456789&redirect_uri=https://app.reputationarm/auth/constantcontact
 
The issue I'm facing is permission request screen doesn't show so user cannot allow required scopes. The url above redirects me to the redirect_uri with the code required to get access_token and refresh_token. When I make token request I get Error 401: Unauthorized as user didn't allow offline_access.
 
Request to get access_token:
 
$response = Http::withHeaders([
       "Content-Type" => "application/x-www-form-urlencoded",
       "Authorization" => $authorization
])->post('https://authz.constantcontact.com/oauth2/default/v1/token', [
      'code' => $code,
      'grant_type' => 'authorization_code',
      'redirect_uri' => 'https://app.reputationarm.com/auth/constantcontact',
]);
 
$authorization is base64 encoded string client_id:client_secret.
 
Let me know what I'm doing wrong. 
 
Regards
1 REPLY 1
John__B
Employee
0 Votes

Hello ClaudiaT857,

 

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 we've already followed up with you directly via email, but I wanted to close the loop here as well. If you haven't received our reply, please let us know via email at webservices@constantcontact.com, and reference case number 30720550.

 

Please have a look and let us know if you have any other questions!

 

Regards,


John B.
API Support Specialist
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.
Resources
Developer Portal

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

Visit Page

Announcements

API Updates

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

Sign Up