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 <https://tools.ietf.org/html/rfc6749#appendix-A.14> . Please refer this section <https://developers.google.com/adwords/api/docs/guides/authentication#access_token_expiration> of guide for better clarity. - Is there a limit on the number of active sessions ? As you are using offline access, the client object <https://developers.google.com/identity/protocols/OAuth2WebServer#creatingclient> 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 <https://developers.google.com/identity/protocols/OAuth2#expiration> of Auth2.0 guide for better clarity. Regards, Sai Teja, AdWords API Team. On Wednesday, August 29, 2018 at 5:06:01 AM UTC-4, karthick r wrote: > > 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! > > K > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To post to this group, send email to adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/82355a4d-7344-4050-834d-c35586d1046d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.