PERMISSION_DENIED

101 views
Skip to first unread message

Паша Карпинский

unread,
Nov 27, 2020, 2:20:48 PM11/27/20
to AdWords API and Google Ads API Forum
Hello Team,

I'm trying to retrive list of accounts (hierarhy of customers) from google ads but receive error on request:
    "message": "The caller does not have permission",
    "code": 7,
    "status": "PERMISSION_DENIED",
    "details": [
        {
            "@type": "google.ads.googleads.v6.errors.googleadsfailure-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "grpc-status-details-bin",
            "data": "<Unknown Binary Data>"
        },
        {
            "@type": "request-id",
            "data": "s8s0RCFzVEtXONYgQQd8Cw"
        }
    ]

I went through auth process under Manager account and receive access token.
This account has many accounts.
When I call listAccessibleCustomers it returns ID of current manager account for what I received access token.
When I call getCustomer to receive info about customer with ID that received from listAccessibleCustomers it returns error above.

Please advice

Thank you


Steve Wilcox

unread,
Nov 30, 2020, 2:18:44 PM11/30/20
to AdWords API and Google Ads API Forum
I'm working on a similar issue where listAccesbleCustomers does not show the same customer IDs that are available when I log into to Ads and review the linked accounts.
The only rational explanation I can think of is that the account I got the token for is NOT the manager account (and thus the token does not give access to the same list of accounts).

Steve Wilcox

unread,
Nov 30, 2020, 2:58:41 PM11/30/20
to AdWords API and Google Ads API Forum
After some digging, I got what I needed by hitting 

https://googleads.googleapis.com/v5/customers/<manager customer>/googleAds:search

with this query:

SELECT customer_client.descriptive_name, customer_client.client_customer, customer_client.resource_name, customer_client.id FROM customer_client LIMIT 100

Hope that helps?

Google Ads API Forum Advisor Prod

unread,
Dec 1, 2020, 2:08:24 PM12/1/20
to p.karp...@gmail.com, adwor...@googlegroups.com
Hello,

Thank you for reaching out to Google Ads API support. From what I understand, you are attempting to call getCustomer on a customer ID that was returned by your call to listAccessibleCustomers, but that call to getCustomer is failing with PERMISSION_DENIED. I took a look at the account associated with the request ID you provided, and see that the developer token is not approved. Non-approved developer tokens can only be used with test accounts, so it is necessary to acquire approval before operating on production accounts.

Regards,
Laura, Google Ads API team

ref:_00D1U1174p._5004Q28lOF0:ref

Pavel Karpinskiy

unread,
Dec 2, 2020, 4:04:56 PM12/2/20
to AdWords API and Google Ads API Forum
Laura, thank you for the clarifications!
I realized that currenlty I can work with test account only.

I can list customer clients of manager account.
However, now I want to read campaign of  test accounts but receive similar  PERMISSION_DENIED error.
Received PERMISSION_DENIED when attempt to retrieve campaign of "test client account 1" or "test client account 2" from attached screens.
 
Please advice

Thank you
Campaigns.png
customers.png

Google Ads API Forum Advisor Prod

unread,
Dec 2, 2020, 6:32:30 PM12/2/20
to p.karp...@gmail.com, adwor...@googlegroups.com
Hello,

No problem! Regarding your follow-up question, please ensure that the correct credentials are being used, i.e. that your google-ads.yaml file contains the correct login customer ID. This should likely match the ID of the test client account being queried.

If this does not resolve the issue, please provide the request and response logs for the failed requests, with any identifying information redacted, or respond directly with the logs via the "Reply privately to author" option.
Reply all
Reply to author
Forward
0 new messages