Hello Naresh, For this particular use case, you can authorize each user and accept the prompt manually once and persist the refresh token using your application. You will have to generate the refresh token, and ensure that you retrieve the authorization code from the browser link by logging in as a user who has access to the AdWords account. Once you have persisted the refresh token for a user, this token can be used to generate the access token for every subsequent API calls without manual intervention. That said, even if you are running a corn job it should work fine without manual intervention as long as the initial authorization is done. Refresh tokens are long lived and they don't expire very often unless the limit of 50 tokens are reached. Our client library uses saved refresh token to generate the access token. Please refer to our PHP guide <https://github.com/googleads/googleads-php-lib/wiki/API-access-on-behalf-of-your-clients-(web-flow)> and sample <https://github.com/googleads/googleads-php-lib/blob/master/examples/Auth/GetRefreshToken.php> for more information.
Thanks, Bharani, AdWords API Team On Thursday, October 5, 2017 at 10:29:19 AM UTC-4, thedi...@gmail.com wrote: > > Hi API Team, > > I am not able to get Auth refresh_token in every request. If any > accidental activity occur by client like no internet while fetching refresh > token or missed to save it then new OAuth2 will not return refresh token > again. so, i want refresh token in every request. We are using this refresh > token for cron job to fetch adwords report. Please guide me. > > Please find attached code file. > > Thank You > Naresh > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords 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 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/1b7a55f3-40a9-4aff-9f18-18ee848f23b9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.