I'm stumped. I set up a new trial account and attempted to use api V3. I want a server side way to add contacts from another system. I make the curl request and it returns 302
REQUEST
curl -X GET -i -H "application/x-www-form-urlencoded" "https://api.cc.email/v3/idfed?response_type=code&client_id={my-client-id-here}&scope=contact_data&re..."
RESPONSE - 302
Body:
"https://idfed.constantcontact.com/as//authorization.oauth2?pfidpadapterid=ctctOAuth2IdpAdapter&clien...{my-client-id-here}&redirect_uri=https://localhost&response_type=code&scope=contact_data&
So now what?
Hello,
It looks like you are trying to connect and/or set up OAuth. The authorization URL once visited should redirect you to a Constant Contact login page, so a 302 would be expected response, though it's designed for you to visit it in a web browser rather than using cURL to GET it. Here's the general process that OAuth would follow:
You then store these fields and use them when making API calls. If you are building this for only use by one Constant Contact account, you can manually authorize using your browser and a REST client. First, go to the authorization URL using a browser, follow the steps to allow access, manually copy the authorization code, and then use your REST client to make the POST call to exchange that code for a refresh and access token.
Please have a look and let me know if you have any questions!
Regards,
David B.
Tier II API Support Engineer
Hello,
I'm facing the same issue. I have navigated to the authorization url through the browser, but it just redirects me to my redirection url and I am not getting redirected to constant Contact login page to allow access. The redirection url I specified can handle post requests too. Please let me know how can I get the authorization code response.
Hello,
I would like to know what the authorization URL is you are using, and to try it out on my end here. For privacy, please email my team at webservices@constantcontact.com with the URL you are using.
Regards,
David B.
Tier II API Support Engineer