Hi,
Our company is an existing user of ADWords API. I'm starting to experiment
with Ads API. I have just downloaded the client library and trying out the
first call to get campaign reports. I'm using the existing credentials that
are working with ADWords API.
I specified the MCC customer id inside ads.properties and the customer id
associated with mcc account in the java call. This did not work and I then
tried all different combination of MCC customer id and customer id.
Combinations include specifying the logincustomer id inside ads.properties
file, with the mcc customer id, or a regular customer id belonging to that
mcc account. And using either of the ids in the
mvn exec:java
-Dexec.mainClass="com.google.ads.googleads.examples.basicoperations.GetCampaigns"
-Dexec.args="--customerId xxxxxxxxxxx"
call.
I have checked that the client id, client secret, developerToken and
refreshToken are set correctly for the specific MCC account inside the
ads.properties file. Still I'm getting the same 401 error.
If you could help me debug this issue, it would be very much appreciated!
Thanks,
Sifang
Status: Status{code=UNAVAILABLE, description=Credentials failed to obtain
metadata, cause=com.google.api.client.http.HttpResponseException: 401
Unauthorized
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1094)
at
com.google.auth.oauth2.UserCredentials.refreshAccessToken(UserCredentials.java:193)
at
com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:165)
at
com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:151)
at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:113)
at com.google.auth.Credentials$1.run(Credentials.java:99)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/7d743e8d-2c2d-437e-bcf9-45c75944ef5d%40googlegroups.com.