cancel
Showing results for 
Search instead for 
Did you mean: 
Constant Contact wants to help you succeed! We’re celebrating our professional service programs on the Constant Contact Community this month and you have a chance to try one of the services for free! Learn more.

OAuth 2.0 authentication Example via Http methods

Occasional Participant

OAuth 2.0 authentication Example via Http methods

Could any one please provide me sample code not in php or javascript, I want it in java by using http methods like request and response.

 

Any help would be greatly appreaciated.

 

Thank you

Mahesh

8 REPLIES 8
CTCT Employee

Re: OAuth 2.0 authentication Example via Http methods

Hi Mahesh,

 

We don't have any officially supported code in Java, but someone did put together this Javascript/PHP example for OAuth 2.  I hope that helps.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Re: OAuth 2.0 authentication Example via Http methods

Hi Shannon,

 

Thank you for your quick reply. Can I use the basic authorization istead of OAuth 2.0

 

Thank you

Mahesh

CTCT Employee

Re: OAuth 2.0 authentication Example via Http methods

Hi Mahesh,

 

You're welcome.  You can still use basic authentication, but we will be deprecating support for basic authentication eventually (the timeline isn't set, but likely within the next year or two).  When that time comes, you can always update your application to use OAuth2.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Re: OAuth 2.0 authentication Example via Http methods

Hello Shannon,

 

When I try to use the code as in below link

 

http://community.constantcontact.com/t5/Developer-Support-ask-questions/Status-Unauthorized-StatusCo...

 

It is throwing me the error. Could you please correct me on this. Your help will be greatly appreciated.

 

Thank you

Mahesh

CTCT Employee

Re: OAuth 2.0 authentication Example via Http methods

Hi Mahesh,

 

I responded to that post just now.

 

Best Regards,

Shannon W.

API Support Specialist

Occasional Participant

Re: OAuth 2.0 authentication Example via Http methods

Hello Shannon,

 

Thank you for your quick response.

 

Could you please post any working example like the one that we have in the other link. Thank would help me a lot. Actually I am not able to figure out the way to make it work

 

Thank you

Mahesh

CTCT Employee

Re: OAuth 2.0 authentication Example via Http methods

Hi Mahesh,

 

I don't know of any other working Java/Javascript examples, but this is a link to a PHP OAuth2 example with fairly thorough instructions on exactly what to change to make it work.  I hope that helps.

 

Best Regards,

Shannon W.

API Support Specialist

Moderator

Re: OAuth 2.0 authentication Example via Http methods

I responded to the original thread with an update on why Basic Authentication was not working.  That should get you passed that point.  As I mentioned in that thread, our strong recommendation is to not use Basic Authentication and to use OAuth 2.0.  Basic Authentication has been depricated and we will no longer use it on all future versions of the API.  Next year there will be notice about the sunsetting plan for this version of the API which will include ending all access to the API using Basic Authentication.

Dave Berard
Senior Product Manager, Constant Contact