We use Constant Contact to manage email campaigns and want to take advantage of your RESTful API to do some integration with our custom CRM. In looking through your API docs I have determined that the OAuth2.0 Server Flow is the right one for our purposes since it doesn’t require interaction by users. I followed the steps outlined on the website(https://v3.developer.constantcontact.com/api_guide/server_flow.html). I am stuck on Step 4: Exchange the Authorization Code for an Access Token and a Refresh Token. I have built the POST request using JSON format in the body of the post. Following are the specifics: URL: https://idfed.constantcontact.com/as/token.oauth2 Headers: "content-type: application/json" "accept: application/json" "authorization: Basic {authcode}" , where {authcode} is the Base64 encoded version of our API Key and Secret gleaned from our My Applications page Body: { "code" : "{code}", "redirect_uri" : "https://www.oursite.com", "grant_type" : "authorization_code", } where {code} is the code returned in the URL in Step 3 When I send the POST request I get the following error: {"error_description":"grant_type is required","error":"invalid_request"} As you can see in the Body above, “grant_type” is clearly being sent. Thoughts?
... View more