Hi, Thanks for the email.
I have tried the curl command but still get the same issue. We currently manage 33 adwords accounts. 13/33 have no RefreshErrors. 23/33 of these accounts have RefreshErrors. We are using the same client_id and client_secret for all 33 accounts. Its strange how the refresh token for 23/33 accounts have expired at relatively the same time.. This problem has only started to happen a few weeks ago and we have not changed any of your authentication code in a long time. Are we hitting some limits somewhere? Thanks Sanjay On Fri, Sep 28, 2018 at 9:43 PM 'Milind Sankeshware (AdWords API Team)' via AdWords API and Google Ads API Forum <adwords-api@googlegroups.com> wrote: > Hi Sanjay, > > The "invalid_grant" error usually indicates that the access or refresh > token being passed in your request is incorrect or invalid. To verify that > your credentials are correct, you could also try the CURL request provided > below and see if you are able to generate the access tokens? If the > credentials are correct, you should get an access token for the below > request. > curl https://www.googleapis.com/oauth2/v4/token \ > -d refresh_token=your-refresh_token \ > -d client_id=your-client-id \ > -d client_secret=your-client-secret \ > -d grant_type=refresh_token > > If your credentials are incorrect and still facing an issue then could you > generate a new refresh token with the help of this guide > <https://developers.google.com/adwords/api/docs/guides/first-api-call#get_an_oauth2_refresh_token_and_configure_your_client> > and > retry your request? As per this guide > <https://developers.google.com/identity/protocols/OAuth2InstalledApp#offline>, > you will need to create limited refresh token. When the user login exceeds > the number of refresh tokens that are generated, the older ones will be > invalidated. For instance, when you create the 51st refresh token for a > given set of credentials the very first refresh token will be invalidated > due to this limit. If you are using the client library > <https://developers.google.com/adwords/api/docs/clientlibraries> to make > the API call, you will need to store this refresh token in property file so > that client library will generate the access token automatically. Let me > know if you have any further questions. > > Thanks, > Milind, 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/LgBodqQwDKA/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/5591a204-8a8c-4f73-b588-476b1ff7c6e0%40googlegroups.com > <https://groups.google.com/d/msgid/adwords-api/5591a204-8a8c-4f73-b588-476b1ff7c6e0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks *Sanjay Hallan* Senior Developer Website: https://goshift.com <http://goshift.com/> This e-mail message may contain confidential or legally privileged information and is intended only for the use of the intended recipient(s). Any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is prohibited. E-mails are not secure and cannot be guaranteed to be error free as they can be intercepted, amended, or contain viruses. Anyone who communicates with us by e-mail is deemed to have accepted these risks. Shift is not responsible for errors or omissions in this message and denies any responsibility for any damage arising from the use of e-mail. Any opinion and other statement contained in this message and any attachment are solely those of the author and do not necessarily represent those of the company. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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/CAO%2BfFCJ32djJGxM9TXou2JN%3DgvUkxz2jPEi4Ntd59PoFMQ0DZQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.