Hi Peter, Thanks for the reply. I am confused by your reply. If I am making 10000 request (with 2000 emails each) and I am calling the above snippet 10000 times , generateCredential() will be called 10000 times. I saw the code and it makes HTTP calls.
*In the examples in the client library such as this one <https://developers.google.com/adwords/api/docs/samples/java/remarketing#add-crm-based-user-list>, you no longer need to modify the current implementation as it already automatically does this for you. It retrieves your credentials from your properties file and refreshes your accessTokens <https://developers.google.com/adwords/api/docs/guides/authentication#access_token_expiration> for each call that you make.* What exactly do you mean by properties file? Do you mean that after the first call to generateCredential() you are storing it in some cache and retrieving it (to instantiate the session object) for all subsequent calls? And also it will only refresh for the access token only after an hour correct? Please bear with me. Thanks On 24 May 2018 at 14:31, 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum <adwords-api@googlegroups.com> wrote: > Hi Prashant, > > What the paragraph implies is that each request you make should make use > of your already thread-safe credentials by simply instantiating the > sessions object. In the examples in the client library such as this one > <https://developers.google.com/adwords/api/docs/samples/java/remarketing#add-crm-based-user-list>, > you no longer need to modify the current implementation as it already > automatically does this for you. It retrieves your credentials from your > properties file and refreshes your accessTokens > <https://developers.google.com/adwords/api/docs/guides/authentication#access_token_expiration> > for > each call that you make. > > Best regards, > Peter > AdWords API Team > > -- > -- > =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ > 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 a topic in the > Google Groups "AdWords API and Google Ads API Forum" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/adwords-api/-ZTdzU32paI/unsubscribe. > To unsubscribe from this group and all its topics, 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/7c89fb07-650f-4599-b17c-9f634ce431b3%40googlegroups.com > <https://groups.google.com/d/msgid/adwords-api/7c89fb07-650f-4599-b17c-9f634ce431b3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- -Prashant Linkedin <https://in.linkedin.com/in/prashantpandeyfun10> Github <https://github.com/prashantpandeyfun10> HackerEarth <https://www.hackerearth.com/@prashantpandeyfun10> Kaggle <https://www.kaggle.com/prashant10> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/CA%2BMaO6_BKAs2Tmntti7QRM1C%2B%3Dn2fN_pDTWxsVbR0%2B-kyyb31g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.