Unexpected UserPermissionDenied Exception When Querying Campaigns

28 views
Skip to first unread message

Jack Williams

unread,
May 31, 2023, 4:07:44 PM5/31/23
to Google Ads API and AdWords API Forum
Hello Ads API Support,

Can you please assist in determining why we are seeing PermissionDenied status codes for one specific customer when querying campaigns?  We can query the customer API successfully, but the campaign endpoint fails.  We have also verified that this customer is able to view the requested campaigns from the UI, but the API is returning a UserPermissionDenied exception. 

Successful Query (RequestID: oD91ZaFv0HbKS04T-dhxYA)

SELECT customer.id, customer.currency_code, customer.final_url_suffix, customer.tracking_url_template

FROM customer


Failing Query (RequestID: VtD6g6VggAnDj3kyh6LSIA)

SELECT campaign.advertising_channel_type, campaign.id, campaign.name, campaign.status, campaign.shopping_setting.merchant_id, campaign.advertising_channel_sub_type, campaign.experiment_type

FROM campaign

WHERE campaign.status IN ('ENABLED', 'PAUSED', 'REMOVED')

ORDER BY campaign.id ASC


Thank you,
Jack

Google Ads API Forum Advisor

unread,
Jun 2, 2023, 1:53:11 PM6/2/23
to jack...@gmail.com, adwor...@googlegroups.com

Hello Jack,

Thanks for reaching out to the Google Ads API Team.

With regards to the UserPermissionDenied error, please note that If you're accessing a client customer, the manager's customer ID must be set in the login-customer-id header. Learn more at https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid

Can you please provide us with the complete request and response logs with request ID generated on your end when you performed your API requests and an uncropped screenshot of the UI since you mentioned that you “verified that this customer is able to view the requested campaigns from the UI” so we can investigate further and provide recommendations?

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

This message is in relation to case "ref:_00D1U1174p._5004Q2lvLDT:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages