Hi, 

I understood that I can still use stored refresh tokens when migrating from 
Google Adwords to Google Ads as 
per https://developers.google.com/google-ads/api/docs/migration/carryover : 

"The requirements for authentication remain the same. The Google Ads API 
uses OAuth2 for authentication, which requires an access token at the time 
of the request. You can re-use your existing refresh token, client id, and 
client secret that were used for the AdWords API without any adjustments."

But we are seeing exceptions like this: 

MethodName: 
google.ads.googleads.v6.services.CustomerService/ListAccessibleCustomers
Endpoint: googleads.googleapis.com:443
Headers: {developer-token=REDACTED, x-goog-api-client=gl-java/11.0.11 
gapic/ gax/1.60.1 grpc/1.34.1}
Body:

Response
--------
Headers: null
Body: null
Failure message: null
Status: Status{code=UNAVAILABLE, description=Credentials failed to obtain 
metadata, cause=com.google.api.client.http.HttpResponseException: 400 Bad 
Request
POST https://oauth2.googleapis.com/token
{
  "error": "invalid_grant",
  "error_description": "Bad Request"
}
        at 
com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1113)
        at 
com.google.auth.oauth2.UserCredentials.refreshAccessToken(UserCredentials.java:203)
        at 
com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:157)
        at 
com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:145)
        at 
com.google.auth.oauth2.UserCredentials.getRequestMetadata(UserCredentials.java:281)
        at 
com.google.auth.Credentials.blockingGetToCallback(Credentials.java:112)
        at com.google.auth.Credentials$1.run(Credentials.java:98)
        at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown 
Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
 
Source)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
}.

Once re-authenticated, (obtained new refresh token, it starts to work 
without above exception being thrown.



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/8bf6f155-d025-4470-b8a6-1ed63e0966a5n%40googlegroups.com.

Reply via email to