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")