Yep, I am facing 'USER_PERMISSION_DENIED <https://developers.google.com/google-ads/api/reference/rpc/v17/AuthorizationErrorEnum.AuthorizationError#user_permission_denied>' error while executing a query in Search <https://developers.google.com/google-ads/api/reference/rpc/v17/GoogleAdsService#search> and SearchStream <https://developers.google.com/google-ads/api/reference/rpc/v17/GoogleAdsService#searchstream> with accounts which I have direct access First, I get list customers accessible by ListAccessibleCustomers <https://developers.google.com/google-ads/api/reference/rpc/v17/CustomerService#listaccessiblecustomers> method. Then I get accounts of customers, because my account I got is root manager, so haven't manager account's ID for it But this error only occurs occasionally. That means sometimes it succeeds and sometimes it returns this error My email that I used to generate the OAuth2 credentials is viennguyendevelo...@gmail.com On Wednesday, August 21, 2024 at 8:24:56 PM UTC+7 Google Ads API Forum Advisor wrote:
> Hi, > > Thank you for reaching out to the Google Ads API support team. > > To confirm, is the issue that you are encountering the ' > USER_PERMISSION_DENIED > <https://developers.google.com/google-ads/api/reference/rpc/v17/AuthorizationErrorEnum.AuthorizationError#user_permission_denied>' > error > while executing a query in Search > <https://developers.google.com/google-ads/api/reference/rpc/v17/GoogleAdsService#search> > and SearchStream > <https://developers.google.com/google-ads/api/reference/rpc/v17/GoogleAdsService#searchstream>, > > though you have direct access to the account in the request? > > To avoid the USER_PERMISSION_DENIED > <https://developers.google.com/google-ads/api/reference/rpc/v17/AuthorizationErrorEnum.AuthorizationError#user_permission_denied> > error, > you will need to ensure that the user / email address you used to generate > the OAuth2 credentials indeed has access > <https://support.google.com/google-ads/answer/9978556?visit_id=637628826037447236-382779227&rd=1> > to > the account in your request. If the user / email address has access to or > is associated with the MCC / manager account, you will need to specify > the MCC / manager account's ID without hyphens (-) as the value of the > login-customer-id > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid> > field. > > Also, to assist you further, please provide us with the "complete API > logs" (request > <https://developers.google.com/google-ads/api/docs/concepts/field-service#request> > > and response > <https://developers.google.com/google-ads/api/docs/concepts/field-service#response> > > with request-id > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id> > > and request header > <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>) > > generated at your end while encountering this error. Additionally, send us > the email address you used to generate the OAuth2 credentials. > > If you are using a client library and haven't enabled the logging yet, I > would request you to enable logging for the specific client library that > you are using. You can refer to the guides Java > <https://developers.google.com/google-ads/api/docs/client-libs/java/logging>, > .Net > <https://developers.google.com/google-ads/api/docs/client-libs/dotnet/logging>, > > PHP > <https://developers.google.com/google-ads/api/docs/client-libs/php/logging>, > Python > <https://developers.google.com/google-ads/api/docs/client-libs/python/logging>, > > Ruby > <https://developers.google.com/google-ads/api/docs/client-libs/ruby/logging> > or Perl > <https://developers.google.com/google-ads/api/docs/client-libs/perl/logging> > to enable logging at your end. For REST interface requests, you can enable > logging via the curl command by using the -i flag. > > You can send the details via *Reply **privately** to the author option*, > or *direct **private** reply* to this email. > > > This message is in relation to case > "ref:!00D1U01174p.!5004Q02vFBpm:ref" (ADR-00264154) > > Thanks, > > [image: Google Logo] Google Ads API Team > > > -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/30be112d-2f36-48db-8a21-cd60d6f93b2en%40googlegroups.com.