Redirect URI not matching

Highlighted
Occasional Participant

Redirect URI not matching

My redirect URL looks like this:

 

http://joomla.development/main/administrator/index.php?option=OPTION&task=CALLBACK_TASK&service=SERV...

 

Which is also added to the application as a redirect URL.

 

I keep getting 400 - Invalid redirect_uri.

 

If I change it to something like http://joomla.development/main/administrator/index.php?id=* as I saw in another post it works but this callback has zero interest in me as I cannot use it.

 

Having used plenty of other services with OAuth I never had any issue with them except constant contact. Anyone can give a clue why this happens?

 

My redirect link to get the authorization code looks like this:

 

https://api.cc.email/v3/idfed?client_id=' . $clientID . '&redirect_uri=' . rawurlencode($redirect_url) . '&scope=' . rawurlencode($this->scope) . '&response_type=code
5 REPLIES 5
Highlighted
Occasional Participant

Re: Redirect URI not matching

Anyone?

Highlighted
Occasional Contributor

Re: Redirect URI not matching

I solved a problem like this by creating a specific endpoint for that variable / workflow that you are trying to reach. 

Highlighted
Moderator

Re: Redirect URI not matching

Hello,

 

Thank you for reaching out to Constant Contact API Developer Support.

 

You can use a wildcard in your redirect URL but can place it at a slightly different spot to accommodate your use case. Please try registering the following as your redirect URI and let me know if you see the same issue:

http://joomla.development/main/administrator/index.php*

 

Regards,

 

David B.
Tier II API Support Engineer

Highlighted
Occasional Participant

Re: Redirect URI not matching

This does not work for me. It throws 400 invalid redirect_uri error.

 

What works is the following:

 

Developer Constant Contact App redirect_uri:

http://joomla.development/main/administrator/index.php?opt=*

 

Then in my code use the following as redirect URL:

http://joomla.development/main/administrator/index.php?opt=something

 

This means I have to change how my other integrations work or create a new way to handle Constant Contact OAuth flow.

 

Highlighted
Occasional Participant

Re: Redirect URI not matching

If I try to use the following Redirect URI in my Constant Contact Application:

 

http://joomla.box/main/administrator/index.php*

 

And then set the following Redirect URI in my application for the authentication process:

 

http://joomla.box/main/administrator/index.php?option=myoption&task=mytask&view=myview

 

Then I get redirected to the following URL after the authentication has been successful:

 

http://joomla.box/main/administrator/index.php?option=myoption&code=AUTH_CODE

 

Why does it use the first $_GET argument and not the others as well?

 

How can I make it use my redirect URL and then pass the authentication code?

 

Developer Portal

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

Visit Page

Constant Contact Would Like To Hear From You!

We want to hear from customers like you about your favorite features and how they have helped your business or organization. Tell us by answering a few questions in...

Read More
Featured