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 
generated using cleint_id,client_secret and refresh token?? What happens if 
the access token expires after 60 minutes,Is that already handled too?? 

Thanks,
Alok

On Friday, June 21, 2019 at 1:28:03 AM UTC+5:30, adsapiforumadvisor wrote:
>
> 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")
>         .build();
> GoogleAdsClient googleAdsClient =
>     GoogleAdsClient.newBuilder()
>         .setCredentials(credentials)
>         .setDeveloperToken("INSERT_DEVELOPER_TOKEN_HERE")
>         .setLoginCustomerId("INSERT_LOGIN_CUSTOMER_ID_HERE") // Manager 
> accounts only.
>         .build();
>
> Please refer to this guide 
> <https://github.com/googleads/google-ads-java#basic-usage> for more 
> information. Let me know if you have any questions.
>
> Thanks,
> Bharani, Google Ads API Team
>
> ref:_00D1U1174p._5001UCYbnu: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 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/95474679-5fad-4f1a-89e3-b16dcba42ad3%40googlegroups.com.

Reply via email to