Accessing Constant Contacts through Https


Accessing Constant Contacts through Https



I want to access the Constant Contacts through Https. I refered the OAuth2.0 authentication mechanism referred in the below link :


and implemented my URLs as below :<my_api_key>&redirect_uri='<myusername>/contacts'




along with a form variable var which contains the previous URL's response message.


but the response of the second URL is simply "internal exception". I am clueless on how to proceed. Can someone guide me on proper implementation of this.


Thanks and Regards,




The Redirect URL must be a URL that is on your server to handle the response we send back to you.  It looks like you're including the resource you're attempting to access, which is going to cause problems with the OAuth flow.  Basically, the simplified OAUth 2.0 flow must be this:



Constant Contact Server                                                        Developer Production Server


Process request                                              <-------------           Request OAuth Access


Send Verification Token to Redirect URL       -------------->          Receive Verification Token


Process request                                              <-------------           Request Access Token from Verification Token


Send Access Token to Redirect URL              -------------->         Receive Access Token



Once you receive the Access token, you can store that locally for all future OAuth 2.0 requests.  This, combined with your API key, Consumer Secret token and your username/request URL will allow you to access the API via HTTPS requests.   For more information on this flow, you should read up on the OAuth 2.0 spec and our implementation here:

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page