Google Ads Api giving 401 unauthenticated

44 views
Skip to first unread message

gunjit khera

unread,
Apr 10, 2019, 1:12:32 AM4/10/19
to AdWords API and Google Ads API Forum
I am trying to access customerService.listAccessibleCustomers through google ads api from one of my accounts.

I am testing the scenario currently through oauth playground, and using my own client id and client secret for the same.
Along with this i am giving the scope as: 
https://www.googleapis.com/auth/adwords
https://www.googleapis.com/auth/userinfo.profile
and trying to access the url: 
https://googleads.googleapis.com/v1/customers:listAccessibleCustomers

but it is continuously giving me unauthenticated, missing oauth credential error.

Am i missing any scope which needs to be added for this to work ??

googleadsapi...@google.com

unread,
Apr 10, 2019, 5:37:31 AM4/10/19
to AdWords API and Google Ads API Forum
Hi,

Thank you for reaching out. As for Google Ads API, the OAuth2 Playground is only used to generate tokens. If you wish to get all the customers that are accessible to the user authenticating the call, it can be done via the API by using ListAccessibleCustomers() method from CustomerService. You may refer to this sample code in github written in java.

If I misunderstood your concern, could you provide a screenshot of the error message when you encountered it?

Regards,
Dave Paurillo
Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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+unsubscribe@googlegroups.com.
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/c36e45f1-92e0-4000-819e-eccc0d421d63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages