The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

M not Getting Token error

Occasional Contributor

M not Getting Token error

I am getting these error when trying to generate the token for my web application.

Code is provided by Constant contact itself which m using. Consumer secret, API key, verification url, username all are match and are correct so can what i am missing now that it is generating error.


"error": "invalid_grant",
  "error_description": "Invalid verification code: **********************"
Occasional Contributor

Re: M not Getting Token error

While debugging

"error": "redirect_uri_mismatch",
  "error_description": "Redirect URI mismatch."
index.php?option=[extension name]&view=constantcontact&type=verification

m using joomla for my development so my path is same both in the keys section as well as in the application code.

 my path in account and code for redirect uri is

http://localhost/[folder name]/administrator/index.php?option=[extension name]&view=constantcontact&type=verification


Re: M not Getting Token error

Our implementation of OAuth 2.0 does not allow for parameters to be set in your base redirect_uri.  In your example, you would want to set your redirect_uri to http://localhoast/[folder_name]/administrator/index.php.  When you actually make the calls, you can populate the redirect URI with optional query parameters and we will return those verbatim as sent in.  Because most query parameters are dynamicly created based on the user starting the flow, though this is not always the case, we require you to add them at request time.  We compare the redirect_uri value to the base URI sent in so if you add query parameters to your redirect_uri value, it will never succeed in comparison since it will never match the base URI. 

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More