Varying redirect URL


Varying redirect URL

I need to include an account ID in the redirect URL I send during the request I make for an access token.  I send a  redirect URL like this (123 is a varying ID) when making the request for the authorization URL to CTCT:


In mashery my redirect URL looks like this:


I get the error that the redirect URLs don't match.


Obviously these 2 URLs don't match.  Is there a way to do what facebook does and just specify a domain name that any redirects can go to rather than have to hardcode the URL in mashery?  Or maybe some sort of wildcard?  Since one of my users can potentially link their account to multiple constant contact accounts I need to be able to designate which one I am getting the access token for.



We do require, per the OAuth 2.0 spec, that the base redirect URI (which includes host and path) matches the one of file.  What both the OAuth 2.0 spec and Constant Contact recommend is to use a query parameter for request specific data, such as  Query parameters are passed as part of the redirect URL exactly as they are sent to us in the initial request.  You can then use the query parameters to process the requesst, do an additional redirect on your domain, etc. 

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

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

Visit Page