Getting a token from a batch job

RostislavK5
Rookie
0 Votes

Good day. I am trying to create a batch job in Java to synchronize contacts between my database and Constant Contact database.

 

Below are the four steps to get the token (this is what I get through Postman). Step #2 responds with a login page, which invokes step #3 upon successful authentication. How can I get a token without the login page? 


1) GET https://authz.constantcontact.com/oauth2/default/v1/authorize?response_type=code&client_id=aaaaaaaaa...
302

2) GET https://identity.constantcontact.com/oauth2/aus1lm3ry9mF7x2Ja0h8/v1/authorize?response_type=code&cli...
200

3) GET https://identity.constantcontact.com/login/step-up/redirect?stateToken=ggggggggggggggggggggggggggggg...
302

4) POST https://authz.constantcontact.com/oauth2/default/v1/token

 

Thank you.

1 REPLY 1
Courtney_E
Moderator
0 Votes

Hello RostislavK5,

 

Thank you for reaching out to Constant Contact API Developer Support. My team is here to assist outside software developers with questions about building into Constant Contact's API.

 

It looks like we've already followed up with you directly via email, but here is the information provided for visibility on the forum:

 

Each of our current OAuth2 authorization flows require the use of a browser to grant access to an application on an account once at which point an application can utilize refresh tokens to maintain access without requiring further authorization through a browser window.

 

OAuth2 Overview:

https://developer.constantcontact.com/api_guide/auth_overview.html

 

Please have a look and let us know if you have any other questions! 


Regards,

Courtney E.
Tier II API Support Engineer

Did I answer your question?
If so, please mark my post as an "Accepted Solution" by clicking the Accept as Solution button in the bottom right hand corner of this post.
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

Polls
How confident are you about the effectiveness of your current marketing strategy?

Top Choice: Not confident at all (79%)