Failed to refresh access token.

96 views
Skip to first unread message

Frank Boateng

unread,
Apr 28, 2021, 3:42:10 AM4/28/21
to AdWords API and Google Ads API Forum
Hello everyone,

I have an app that uses refresh token to communicate but it expires after some days. This is the message {Error:"invalid_grant", Description:"Token has been expired or revoked.", Uri:""}

I would like to have one fresh token that does not expires or enable my app to generate and use new refresh token every time the token expires

Thanks 

Google Ads API Forum Advisor Prod

unread,
Apr 28, 2021, 9:02:45 AM4/28/21
to fboa...@truworths.co.za, adwor...@googlegroups.com

Hi Frank,

Thank you for reaching out. Here are some common causes for the refresh token expiration. One of them is that “A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.” You could change the publishing status to production to avoid this issue.

Thanks and regards,
Xiaoming, Google Ads API Team

 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q2GICzX:ref

Frank Boateng

unread,
Apr 29, 2021, 5:16:29 AM4/29/21
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com

Thank you Xiaoming for your response. Yes the status was Testing and its now In Production

 

 

From: Google Ads API Forum Advisor Prod [mailto:adsapifor...@gmail.com]
Sent: Wednesday, April 28, 2021 3:02 PM
To: Frank Boateng
Cc: adwor...@googlegroups.com
Subject: RE: Failed to refresh access token.

 

This email originated from outside Truworths. Please exercise caution before replying, clicking on links, or opening attachments.

 


Hi Frank,

Thank you for reaching out. Here are some common causes for the refresh token expiration. One of them is that “A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.” You could change the publishing status to production to avoid this issue.

Thanks and regards,
Xiaoming, Google Ads API Team

 

Image removed by sender. Google Logo

Xiaoming

Google Ads API Team

 

Image removed by sender.

ref:_00D1U1174p._5004Q2GICzX:ref



To read our E-mail Legal Notice click here:https://www.truworths.co.za/popup/email-disclaimer
or contact ab...@truworths.co.za to e-mail the notice to you if you are not able to access this link.

Frank Boateng

unread,
Oct 18, 2021, 9:58:44 AM10/18/21
to Google Ads API Forum Advisor Prod, adwor...@googlegroups.com

Good day,

 

I have Google Adwords .net application that upload offline GCLID data. I have to convert that to Google Ads but the parameter. In the Adwords, there was a conversion name in the offline conversion feed method but there is no conversion name in Ads. There is couple of changes that  I can’t figure out but I will attach screenshots and highlight the difference

 

If you can help me with the difference and what to use in place of the conversion name and what values are required for customer ID and conversion action ID

The customer ID I have is used as the AdWordsUser of the GoogleAdsClient

 

 

Adwords API code

 

Ads API Code

 

 

 

Regards

Frank

 

 

From: Frank Boateng
Sent: Thursday, April 29, 2021 11:16 AM
To: 'Google Ads API Forum Advisor Prod'
Cc: adwor...@googlegroups.com
Subject: RE: Failed to refresh access token.

 

Thank you Xiaoming for your response. Yes the status was Testing and its now In Production

 

 

From: Google Ads API Forum Advisor Prod [mailto:adsapifor...@gmail.com]
Sent: Wednesday, April 28, 2021 3:02 PM
To: Frank Boateng
Cc: adwor...@googlegroups.com
Subject: RE: Failed to refresh access token.

 

This email originated from outside Truworths. Please exercise caution before replying, clicking on links, or opening attachments.

 


Hi Frank,



Thank you for reaching out. Here are some common causes for the refresh token expiration. One of them is that “A Google Cloud Platform project with an OAuth consent screen configured for an external user type and a publishing status of "Testing" is issued a refresh token expiring in 7 days.” You could change the publishing status to production to avoid this issue.

Thanks and regards,
Xiaoming, Google Ads API Team

 

Image removed by sender. Google Logo

Xiaoming

Google Ads API Team

 

Image removed by sender.

ref:_00D1U1174p._5004Q2GICzX:ref

Google Ads API Forum Advisor

unread,
Oct 19, 2021, 12:30:36 AM10/19/21
to fboa...@truworths.co.za, adwor...@googlegroups.com
Hi Frank,

Thank you for raising your concern.

Please note that the implementation of the Google Ads API is not the same with the implementation of the AdWords API. I would suggest referring to this document to know the equivalent service of the OfflineConversionFeedService and inspect the fields that you need to set in uploading conversions using Google Ads API. Furthermore, the API service to upload conversions using Google Ads API is no longer asking for the conversion action name, but is now requiring the resource name of the conversion action instead.

To know more information on uploading conversions using Google Ads API such as sample implementation, then I would suggest referring to the following guides below:
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks
https://developers.google.com/google-ads/api/docs/conversions/upload-calls

Let me know if you have further questions.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q2GICzX:ref

Frank Boateng

unread,
Oct 20, 2021, 9:14:29 AM10/20/21
to Google Ads API Forum Advisor, adwor...@googlegroups.com

Hi Ernie,

 

I have been facing conversion time issues. The documentation provides me with the date time format in the code image below yyyy-mm-dd hh:mm:ss+|-hh:mm

My country is south Africa as indicated with the currency code ZAR . The error message am getting is the string date format. I can see there is a time range and am finding it difficult to fix this

 

The older adwords has this date time format  //string conversionTime = DateTime.Now.ToString("yyyyMMdd HHmmss zzz");

 

I will be grateful for your help…

 

Thanks

 

 

 

 

 

From: Google Ads API Forum Advisor [mailto:ads...@forumsupport.google]
Sent: Tuesday, October 19, 2021 6:30 AM
To: Frank Boateng
Cc: adwor...@googlegroups.com
Subject: RE: Failed to refresh access token.

 

This email originated from outside Truworths. Please exercise caution before replying, clicking on links, or opening attachments.

 


Hi Frank,

Google Ads API Forum Advisor

unread,
Oct 21, 2021, 2:16:19 AM10/21/21
to fboa...@truworths.co.za, adwor...@googlegroups.com
Hi Frank,

Thank you for providing further details to your concern.

Since the issue was encountered in the code, then I would suggest to raise this issue instead to the author of the client library as they are more equipped here. Since it appears that you are using PHP client library, then I would suggest posting your concern here. Also, you may use this ready to use sample code instead for uploading conversions.
Reply all
Reply to author
Forward
0 new messages