Join our Ask A Trainer Sessions and Chat With our Great Trainers!

localhost redirection not working

SOLVED
Go to solution
divyasreem
Rookie
0 Votes

Hi ,

I am integrating constant contact api to my site . but auth redirection not working i first give http://localhost and dont get then i use 127.0.0.1 and changed my virtualhost setting . not working returning  "'Invalid redirect.  and Please close the window to return to your application. '"

 

Please help me to solve this.   my url is here

 

https://oauth2.constantcontact.com/oauth2/oauth/siteowner/authorize?client_id=myclientid&redirect_ur...

 

If i close that window nothing happen not redirecting to  my site . 

 

can anyone provide me a simple code to integrate costant contact

1 ACCEPTED SOLUTION
David_B.
Employee
0 Votes

Hello,


Thank you for reaching out to Constant Contact API Support.

 

The redirect URI is used to authenticate the application with Constant Contact, so the value that you give us when making an authorization call needs to match what is stored for the application in your Mashery developer application. 

When you initially create an application, the redirect URI by default is set to http://localhost but if you wish to use http://127.0.0.1 you will need to edit your application in Mashery and update your redirect URI. Here is a link on where to go to do this: https://constantcontact.mashery.com/apps/myapps

 

Please let me know if you have any other questions!

 

Sincerely,
David B.
Tier II API Support Engineer

View solution in original post

3 REPLIES 3
David_B.
Employee
0 Votes

Hello,


Thank you for reaching out to Constant Contact API Support.

 

The redirect URI is used to authenticate the application with Constant Contact, so the value that you give us when making an authorization call needs to match what is stored for the application in your Mashery developer application. 

When you initially create an application, the redirect URI by default is set to http://localhost but if you wish to use http://127.0.0.1 you will need to edit your application in Mashery and update your redirect URI. Here is a link on where to go to do this: https://constantcontact.mashery.com/apps/myapps

 

Please let me know if you have any other questions!

 

Sincerely,
David B.
Tier II API Support Engineer

user05212
Rookie
0 Votes

HI, I upadted as per your instruction but I am getting "Please close the window to return to your application."

Jimmy_D
Employee
0 Votes

Hi @user05212,

 

If you are redirecting to your IP address then the process will open a tab in your browser going to the location. If there is no website at that location then the page will just display the message. The URL for that tab that is opened should contain information needed for the next step such as your response code.

 

Please go through the steps again and look for the response code and then you should be able to move to the next step of the oAuth process.


Regards,
Jimmy D.
Tier II API Support Engineer
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