Hi there!

I use the Google Ads java library. I need to list all Google Ads accounts 
that a certain Google user can access (directly or indirectly). For the 
directly accessible accounts, I can use List Accessible Accounts 
<https://developers.google.com/google-ads/api/docs/account-management/listing-accounts#java>
.

For the accounts that can be accessed via manager account, I can use the 
GoogleAdsServiceClient.search() 
<https://developers.google.com/google-ads/api/reference/rpc/v8/GoogleAdsService#search>
 
with some query like "SELECT customer_client.client_customer, 
customer_client.descriptive_name, customer_client.id FROM customer_client 
WHERE customer_client.level <= 1" similar to Get Account Hierarchy 
<https://developers.google.com/google-ads/api/docs/account-management/get-account-hierarchy>
.

With the production token, everything works as expected. The problem is 
when I use our test developer token which can only be used with testing 
Google Ads accounts. "List Accessible Accounts" returns all accessible 
accounts, both for testing, and production. Then, when I try the Search 
request with one of the production accounts, I get an error 
"authorization_error: DEVELOPER_TOKEN_NOT_APPROVED,  message: "The 
developer token is not approved. Non-approved developer tokens can only be 
used with test accounts."". "List Accessible accounts" response doesn't 
contain the information if the account is testing or not. Get Customer 
<https://developers.google.com/google-ads/api/reference/rpc/v8/CustomerService#getcustomer>
 results 
in the same error when I try with a production account.

Is there any way to list all accounts accessible by a user with a test 
developer token?

Thanks,
Katerina

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/2cbde93e-5150-4279-a930-f3ef94d17c46n%40googlegroups.com.
  • List access... 'Kateřina Henzlová' via AdWords API and Google Ads API Forum
    • RE: Li... Google Ads API Forum Advisor
      • Re... 'Kateřina Henzlová' via AdWords API and Google Ads API Forum
        • ... Google Ads API Forum Advisor
          • ... 'Kateřina Henzlová' via AdWords API and Google Ads API Forum
            • ... Google Ads API Forum Advisor

Reply via email to