I was trying the
example
https://github.com/googleads/google-ads-java/blob/master/google-ads-examples/src/main/java/com/google/ads/googleads/examples/basicoperations/GetAdGroups.java,
but was getting the below error.
Status: Status{code=UNAUTHENTICATED, description=Request is missing
required authentication credential. Expected OAuth 2 access token, login
cookie or other valid authentication credential.
I tried to get the session, using the following code
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();
Am I missing anything?? Should I be giving the access token?? If yes where
I can get the access token?
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2f05f6b8-1fbb-4053-ad57-8ab6e43e7f64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.