Athentication - "Invalid redirect"

Occasional Participant

Athentication - "Invalid redirect"

I'm seeing this invalid redirect message after pressing grant access.  Here is how my api key is set and the message I receive.  Any ideas on the cause or how I should chase it down?


My API redirect url:   http://localhost/am/


The page respons after pressing "grant access" button -


The message of the respons: "Invalid redirect"

Occasional Participant

solved, was not passing matching redirecturl

Thanks for the update Rob!

Can I get a little more info about this redirect URI?


1. Does the localhost URL have to be SSL (https://localhost instead of http://localhost)?

2. Does the redirect URI have to be the complete path (http://localhost/OAuth/ConstantContact/ instead of http://localhost)?

3. Is there any information appended to the redirect URI by Constant Contact that needs to be considered?


Thanks for any information!



Here are the answers to your questions!


As a quick note before we start, the Redirect URI is used as part of the authentication flow for OAuth2. Outside of that flow, the Redirect URI is not used.


1. No, it does not. The redirect URI can be any valid URI, and it must be set when you are creating your API key. You can also update an existing API key with a new Redirect URI by going to

2. The Redirect URI needs to point to the page on your host (whether that be local or external) that is responsible for handling the OAuth process.

3. When the user authenticates your application and is sent to the Redirect URI, it will have two parameters attached to it:

- code [This is  a code that must be exchanged for an access token which will allow you access to the Constant Contact account that was authenticated]

- username [ this is the username of the account that was authenticated]

The format will look like this: https://somedomain?code=dkdd93ldd0ldf03ds0d&username=joesflowers


For more information about using OAuth2, you can read this article.


If you do have more questions, please feel free to respond to this post!



Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer

I'm a Goldmine user that is working with an older version (2014). Goldmine is telling me the only way to work/import data from Constant Contact is to upgrade to a later version.   That is costly and a huge time investment for our IT department.  Would you have any suggestions of a work around or patch that would allow Goldmine and Constant Contact to connect.  I get the message "invalid redirect".  The last sync for me between Goldmine and Constant Contact was August 2017.

Originally they had suggested a "patch", but it is no longer available to me.

Thank you for any ideas.

Hi @BoKruck,


The invalid redirect message generally only occurs if the redirect URI is different in the integration compared to the value listed in your Mashery account. If you are the developer of the integration then this is something that you can change on your own. If you did not develop the integration then you would need to reach out to the developer so they can make sure those values match.


I cannot speak to the requirement of having to upgrade to a different version of Goldmine in order to continue using it as Constant Contact did not create the integration. You may want to check on our Marketplace to see if there are any other alternate options for you.

Jimmy D.
Tier II API Support Engineer
Developer Portal

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

Visit Page