Hi Matt,

I don't know which one I used but I can explain our flow - it should be 
pretty standard.


   1. We invoke the oauth popup window from our web-app (our client angular 
   ui). 
   2. Once user authenticate in oauth window, google returns the auth code 
   to our web-app
   3. We send auth code received from Google to our server-side 
   application. It uses library mentioned above.
   4. Our server side application exchanges auth code for refresh token.
   5. We store and use received refresh token to call Google Ads api.

On 4, we use the following method to get refresh token:

userAuthorizer()
    .getCredentialsFromCode(authorizationCode, create(baseUri))
    .getRefreshToken();

where userAuthorizer is (from com.google.auth.oauth2;)

private UserAuthorizer userAuthorizer() {

    return UserAuthorizer.newBuilder()
       .setClientId(of(clientId, clientSecret))
       .setCallbackUri(create(callbackUri))
       .setScopes(asList(scopes))
       .build();
}

Anyway, I am confused because if token was somehow invalidated by Google, 
it would not be valid few minutes later (without User action) - which also 
happens.

It puzzles what is the root cause of the error, as it seems it is caused by 
timeout with the message indicating problems with credentials.

Thanks for the clues.

On Wednesday, February 17, 2021 at 9:30:32 PM UTC adsapiforumadvisor wrote:

> Hi Nenad,
>
> Thanks for reaching out. It looks like you are using the AdWords API. Can 
> you please confirm if you are using this guide 
> <https://developers.google.com/adwords/api/docs/guides/authentication> to 
> create the refresh token?
>
> Thanks,
> Matt
> Google Ads API Team
>
> [image: Google Logo] 
> Matt 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2CRvhk:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/e26fef29-989d-4d77-afd9-720b11874f0fn%40googlegroups.com.

Reply via email to