cancel
Showing results for 
Search instead for 
Did you mean: 

OAuth how i can specify the localhost address as the redirect uri reply urgently

Occasional Contributor

OAuth how i can specify the localhost address as the redirect uri reply urgently

Hi Everyone,

 

I am new to Constant Contact APIs and i am using CC APIs with php. i have got the php library from CC Sample Codes and i trying to authenticate using that class but it is returning the error "Invalid redirect." and i have put this redirect uri in API "http://localhost/cc/CCLibrary/examples/addContact.php" please help me what is wrong there.

 

 

Thanks 

 

Samran Naveed

1 REPLY 1
Trusted Contributor

Re: OAuth how i can specify the localhost address as the redirect uri reply urgently

Hello Samran,

 

You can use a localhost url in your redirect uri with our OAuth 2 implementation. In this case, it looks like you're using the wrapper, and the issue may be that you you have specified the addContact.php example as the redirect uri.  In the config.php file, the $verficiationURL is where the redirect uri value (same as for your API key) should be set, and that should be the home of your authorization script (possibly example_verification.php, if you're relying on the authentication from the wrapper.

 

The $returnURL value in the config.php should then be your program script url (the one you indicated, I suspect.

Mark Coleman
Support Engineer