Redirect URI not matching

user41118
Rookie
0 Votes

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
user41118
Rookie
0 Votes

Anyone?

IntegrationT4
Constant Contact Partner
0 Votes

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

David_B.
Employee
0 Votes

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

user41118
Rookie
0 Votes

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.

 

user41118
Rookie
0 Votes

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?

 

Resources
Developer Portal

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

Visit Page

Announcements

API Updates

Join our list to be notified of new features and updates to our V3 API.

Sign Up