StatusCode="PermissionDenied" in InvoiceService

52 views
Skip to first unread message

JUANPABLO SANMARTIN

unread,
Nov 12, 2020, 10:40:19 AM11/12/20
to AdWords API and Google Ads API Forum
Hello, I am querying the google ads api, I have several methods already implemented but the following case generates an error: I need to get my clients' invoices. We have an agency account that manages multiple clients. Is it a permission problem? should i request something additional? Attached code example .

 /*INVOCICES*/
 InvoiceServiceClient googleAdsInvocice = client.GetService(Services.V5.InvoiceService);
            
 ListInvoicesRequest filterInvoice = new ListInvoicesRequest();
 filterInvoice.CustomerId = "XXXXXXXXX"; //I have tried with the coustomerID and with my admin ID
 filterInvoice.BillingSetup = "customers/xxxxxxxxx/billingSetups/xxxxxxxxxxx";
 filterInvoice.IssueYear = "2020";
 filterInvoice.IssueMonth = Google.Ads.GoogleAds.V5.Enums.MonthOfYearEnum.Types.MonthOfYear.January;

 InvoiceServiceClient invService = client.GetService(Services.V5.InvoiceService);
 ListInvoicesResponse response = new ListInvoicesResponse();
 response = invService.ListInvoices(filterInvoice);


This answer I get by console  :
Status(StatusCode="PermissionDenied", Detail="The caller does not have permission")

Google Ads API Forum Advisor Prod

unread,
Nov 13, 2020, 2:18:34 AM11/13/20
to juanpablo...@globalservs.com, adwor...@googlegroups.com
Hi Juan Pablo,

So our team can have a closer look at the issue and further investigate, could you provide the complete request and response logs that were generated when the error occurred?

You may send the requested information using the Reply privately to author option.

You may also note that the InvoiceService would first require you to be allowlisted before you can use it, as discussed here. If you haven't yet, you would need to reach out to your Google manager or representative to submit the request on your behalf.

Thanks,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


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