Permission denied on test account

360 views
Skip to first unread message

Stephen Bates

unread,
Sep 29, 2022, 10:53:53 AM9/29/22
to Google Ads API and AdWords API Forum
I have followed the steps here to setup a test account: https://developers.google.com/google-ads/api/docs/first-call/test-accounts 

I then followed the steps here to generate an OAuth2 client secret, client ID and refresh token: https://github.com/googleads/google-ads-dotnet/wiki/API-access-using-own-credentials-(desktop-application-flow) 

I used all of those credentials (in addition to a developer token generated on our main production manager account) to try to make a call using the Google API (C# client library) to retrieve a list of campaigns in the test using the customer ID of the test client account created in the first step.

Unfortunately, I keep getting a Permission Denied error and I've exhausted all my options for troubleshooting. Full error stacktrace:

Grpc.Core.RpcException: Status(StatusCode="PermissionDenied", Detail="The caller does not have permission")
at Grpc.Net.Client.Internal.HttpContentClientStreamReader`2.MoveNextCore(CancellationToken cancellationToken)
at Google.Ads.Gax.Interceptors.StreamingRpcInterceptor`1.MoveNext(CancellationToken cancellationToken)
at Google.Api.Gax.Grpc.AsyncResponseStream`1.MoveNextAsync(CancellationToken cancellationToken)
at Google.Ads.GoogleAds.V11.Services.GoogleAdsServiceClient.<>c__DisplayClass32_0.<<SearchStreamAsync>b__0>d.MoveNext()

Any suggestions on what I should do?

Google Ads API Forum Advisor

unread,
Sep 30, 2022, 1:37:38 AM9/30/22
to stephe...@bannerflow.com, adwor...@googlegroups.com

Hi Stephen,


Thanks for reaching out to the Google Ads API team. I hope you are doing well today.
 

The USER_PERMISSION_DENIED means that a user doesn't have permission to access a customer and you’re accessing a client customer using 'login-customer-id’ in the request.


To address the above error, you will need to ensure that the user / email address you used to generate the credentials indeed has access to the account in your request. If the user / email address has access or is associated with the MCC / manager account, you will need to specify the said MCC / manager account ID as the value of the login-customer-id field.
 

If the issue persists, please provide us the complete request and response logs with request ID and request header generated on your end? You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com. If you haven't enabled the logging yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.
 

Regards,

Google Logo
Darwin
Google Ads API Team
 


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