PERMISSION_DENIED when call listAccessibleCustomers() [Google Ads API]

149 views
Skip to first unread message

Artem Konyukhov

unread,
Dec 15, 2020, 9:48:04 AM12/15/20
to AdWords API and Google Ads API Forum
Hi,

I'm trying to receive list of accounts from Google Ads API but receive error:

  "message": "The caller does not have permission", 
  "code": 7, 
  "status": "PERMISSION_DENIED", 
  "details": [ 
     { "@type": "google.ads.googleads.v6.errors.googleadsfailure-bin", "data": "" }, 
     { "@type": "grpc-status-details-bin", "data": "" }, 
     { "@type": "request-id", "data": "1kfiYeBhZTWOrD4heMSiaw" } 
   ] 
}

This problem occurs when I call: listAccessibleCustomers()

        $customerServiceClient = $googleAdsClient->getCustomerServiceClient();
        $accessibleCustomers = $customerServiceClient->listAccessibleCustomers();

I use already approved application.

Google Ads API Forum Advisor Prod

unread,
Dec 16, 2020, 11:15:16 AM12/16/20
to aar...@gmail.com, adwor...@googlegroups.com
Hi Artem,

Thanks for reaching out. A common cause of this error is that the login customer ID is not provided, but that ID is not required listing accessible customers. It's possible that it is an issue related to your developer token. Are you able to make any other successful calls? Can you confirm if the developer token has been approved?

Thanks,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q29S43R:ref

Artem Konyukhov

unread,
Dec 16, 2020, 11:45:04 AM12/16/20
to AdWords API and Google Ads API Forum
Thx, for idea
I will check developer token.

But current developer token still work successful with AdWords API

среда, 16 декабря 2020 г. в 18:15:16 UTC+2, adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
Dec 17, 2020, 9:29:18 AM12/17/20
to aar...@gmail.com, adwor...@googlegroups.com
Hi Artem,

Please let me know if the issue continues. If is not resolved, can you confirm if the Ads API and AdWords API calls are being made against the same production account? 

Also, you can find the documentation for this error here.

Regards,

Artem Konyukhov

unread,
Dec 17, 2020, 10:27:40 AM12/17/20
to AdWords API and Google Ads API Forum
Hi Matt,
Unfortunately issue is continue. 
We checked developer token and don't have any alerts about unapproved token.

Also I use different accounts for connecting to approved application, but still got it error.
четверг, 17 декабря 2020 г. в 16:29:18 UTC+2, adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
Dec 18, 2020, 10:41:05 AM12/18/20
to aar...@gmail.com, adwor...@googlegroups.com
Hi Artem,

You mentioned that the developer is able to make calls using the AdWords API still. Can you confirm if they have followed the migration guide and made any necessary updates to the configuration file (the guide provides an example with the Java client library configuration file)?

If the issue persists after checking the migration, can you please provide the complete request and response logs privately?

Thanks,

Artem Konyukhov

unread,
Dec 18, 2020, 1:05:03 PM12/18/20
to AdWords API and Google Ads API Forum
When I switched on logger for GoogleAdsClientBuilder I sow new errors:
{"errors":[{"errorCode":{"authorizationError":"DEVELOPER_TOKEN_PROHIBITED"},"message":"Developer token is not allowed with project '613082149849'."}]}

After that I found description in the documentation: 
>> Each Google API Console project can be associated with the developer token from only one manager account.


I have:
- developer token which connect to project
- project, which approved for Google Ads & AdWords and success works with AdWords
- I have error: DEVELOPER_TOKEN_PROHIBITED when call Google Ads API

I did't change project.
Can I use one project for Adwords API and Google Ads API ?

пятница, 18 декабря 2020 г. в 17:41:05 UTC+2, adsapiforumadvisor:

Google Ads API Forum Advisor Prod

unread,
Dec 21, 2020, 1:19:25 AM12/21/20
to aar...@gmail.com, adwor...@googlegroups.com
Hi Artem,

Thank you for your follow and for providing these additional details.

The DEVELOPER_TOKEN_PROHIBITED indicates that the developer token is not allowed with the project sent in the request.

"Each Google API Console project can be associated with the developer token from only one manager account. Once you make a Google Ads API request, the developer token is permanently paired to the Google API Console project. If you do not use a new Google API Console project, you'll get a DEVELOPER_TOKEN_PROHIBITED error when making a request."

That said, I would recommend that you create a new project instead for your Google Ads API requests in order to avoid this error.

Best regards,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q29S43R:ref
Reply all
Reply to author
Forward
0 new messages