Hello Alok,
If you are using our client libraries, you will have to generate the refresh
token only once and the access tokens will be automatically refreshed with the
refresh token that you are using. Please refer to this guide for more
information.
Thanks,
Bharani, Google Ads API Team
ref:_0
Hi Bharani,
Thanks for the info.Another follow up question on the same.
There is an option of setting access token in UserCredentials object but
it is not being used as per the example given below by you. Is it not
mandatory to set access token anymore and is access token automatically
gen
Hi Alok,
You can construct the Credentials object as below and pass them to the
GoogleAdsClient:
Credentials credentials =
UserCredentials.newBuilder()
.setClientId("INSERT_CLIENT_ID")
.setClientSecret("INSERT_CLIENT_SECRET")
.setRefreshToken("INSERT_REFRESH_TOKEN")
Hi,
We are planing to use google-ads-java client library to migrate from Google
Adwords API to Google Ads API.
I have all the required values of client_id,client_secret,refresh token and
access token etc. Whats the best way to set Oauth credentials using java
client.
I have already gone though