adwords api session limitations

59 views
Skip to first unread message

karthick r

unread,
Aug 29, 2018, 5:06:01 AM8/29/18
to AdWords API and Google Ads API Forum
Hello all,
We have a batch job which calls the Google Adwords APIs to generate reports on a monthly basis. 
We use the adwords-lib and adwords-axis dependencies to connect to the Adwords APIs.
And we create the session this way 

adwordsCredential = new OfflineCredentials.Builder().

 

 forApi
(OfflineCredentials.Api.ADWORDS)

 
.withRefreshToken(refreshToken)

 
.withClientSecrets(clientId, clientSecret)

 
.build().

 generateCredential
();

 

 adWordsSession
= new AdWordsSession.Builder()

 
.withClientCustomerId(clientCustomerId)

 
.withDeveloperToken(developerToken)

 
.withOAuth2Credential(adwordsCredential).

 build
();


I am trying to find out the best practices to manage the sessions. 



- What happens to the sessions we create ? Do they expire ?

- Is there a limit on the number of active sessions ?


Thanks!

Teja Makani

unread,
Aug 29, 2018, 3:51:54 PM8/29/18
to AdWords API and Google Ads API Forum
Hello Karthick,

Please find my responses inline:


- What happens to the sessions we create ? Do they expire ? 
Yes, the sessions expire when the access token expires. This depends on the value set in expires_in . Please refer this section of guide for better clarity.


- Is there a limit on the number of active sessions ? 
As you are using offline access, the client object is refreshing the access token as needed to keep the session alive. However, there is a limit of 50 refresh tokens per user account per client which will decide the limit on number of active sessions. Please refer this section of Auth2.0 guide for better clarity.

Regards,
Sai Teja, AdWords API Team.

karthick r

unread,
Aug 29, 2018, 7:55:49 PM8/29/18
to AdWords API and Google Ads API Forum
Hello Teja, 

Thanks for answering my questions. 
Reply all
Reply to author
Forward
0 new messages