Enter the Share Your Success Sweepstakes 2024 For the Chance to Win Great Prizes!

V3 API integration

JuneL4
Rookie
0 Votes

Hello Again,

 

We have started to integrate V3  API.  We have completed following step.

 

1. Generate CODE - To recreate case, I am providing detail here. Using the following URL, You can generate the code.
https://authz.constantcontact.com/oauth2/default/v1/authorize?client_id=ec179f3f-5e8e-454c-a015-ec35...

2. Generating token - Using CODE we are getting using above URL we are trying to generate access token. Following detail, we have used for that. : https://prnt.sc/fHNkDgHFIbU0
You can check the error we are getting. So we need help to move forward from here.

https://authz.constantcontact.com/oauth2/default/v1/token

Parameter : 
code: [Take latest from Generate CODE URL]
redirect_uri:https://caasafety.com.au/
grant_type:authorization_code
client_id:ec179f3f-5e8e-454c-a015-ec35ab0bce53

Could you please guide us what is wrong here?

1 REPLY 1
John__B
Employee
0 Votes

Hello JuneL4,

 

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.

 

After reviewing the logs for your key, it appears that the reason you are encountering the “Client authentication failed” error response is because your client_id & client_secret have not yet been Base64 encoded in the Authorization header of the token request. This request requires basic authentication for the string “client_id:client_secret”. 

 

In Postman, this can be entered in the authorization tab of the request with the authorization type set to “Basic Auth”. The username would be the client_id and the password would be the client_secret. Below I am including documentation for the access and refresh token request. I would recommend reviewing the section titled “Authentication” for more information about the basic authentication requirement.

 

Get the Access and Refresh Token:

https://v3.developer.constantcontact.com/api_guide/server_flow.html#step-4-get-the-access-token-and-...

 

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