Hi Paolo,
The AuthorizationError.USER_PERMISSION_DENIED
<https://developers.google.com/adwords/api/docs/common-errors#AuthorizationError.USER_PERMISSION_DENIED>
error
you encountered means that there is no link between the manager account
authenticated in the request with the client account specified in the
headers or your OAuth2 credentials are for a user who does not have access
to the client customer ID specified or any of its manager accounts. This
being said, you should make sure that the OAuth2 credentials you are using
were generated using an email address which has access to the account(s)
you are making the API requests to. Also, you could use
ManagedCustomerService
<https://developers.google.com/adwords/api/docs/reference/v201806/ManagedCustomerService>
to
determine which client accounts are linked to your manager account. You may
check this sample code
<https://developers.google.com/adwords/api/docs/samples/php/account-management#get-the-account-hierarchy-under-the-current-account>
for
reference.
If the issue persist, could you provide which email address you use to
generate your OAuth2 credentials? Also, could you provide which
clientCustomerId you are making API calls when you encountered the error?
Please reply via *Reply privately to author*.
Thanks and regards,
Luis
AdWords API Team
On Friday, July 27, 2018 at 1:04:59 PM UTC+8, Albert Paolo Rogelio wrote:
>
> Hello. Im new here but i have read other error message and other queries
> from users here.
>
> My email has the access to 4 manager accounts (including my email it self)
> in adwords.
> but when authenticating in my application (PHP laravel), i got
> USER_PERMISSION_DENIED error.
>
> this is my code from getting campaigns:
>
> $ads = new GoogleAds();
>
> $campaignService = $ads->service(CampaignService::class);
> $campaigns = $campaignService->select('campaign_id')->get();
>
> dd($campaigns);
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
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/f65a59f7-f69e-4e2d-a024-3eaf357a5c3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.