Hi Ernie, 

So I get the PERMISSION_DENIED error message when running the API for 
myself. When the person who created the API in API console runs it, he gets 
back a blank response. 

Here is the API request. Is there anything else I need to include in here? 

function makeRequest() {
var adsService = getAdsService();
console.log(adsService.getAccessToken())
var response = 
UrlFetchApp.fetch('https://localservices.googleapis.com/v1/accountReports:search?query=manager_customer_id:{manager_customer_id}',
 
{
headers: {
Authorization: 'Bearer ' + adsService.getAccessToken(),
Accept: 'application/json'
},
'method' : 'GET',
'contentType' : 'application/json'
});
console.log(response)

I am following the documentation for calling the Local Services API exactly 
as they had written in the example call: 
https://services.google.com/fh/files/helpcenter/lsa_api_dev_guide.pdf

Why am I not getting a response from the API???
On Wednesday, December 1, 2021 at 10:30:43 PM UTC-8 adsapi wrote:

> Hi Basil,
>
> Thank you for reaching out to our team.
>
> Could you confirm if you are using the Google Ads API 
> <https://developers.google.com/google-ads/api/docs/start> inside the 
> Google spreadsheet and encountered the error PERMISSION_DENIED? If yes, 
> then *USER_PERMISSION_DENIED* occurs when the authorized customer does 
> not have access to the operating customer or authenticating as a user with 
> access to a manager account but not specifying *login-customer-id* in the 
> request. With this, you will need to specify the *login-customer-id* as 
> the manager account ID without hyphens (-). Client libraries have built in 
> support for this, or see our guide 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid>
> .
>
> Also, when we say customer and manager accounts, we are referring here 
> <https://support.google.com/google-ads/answer/6139186?hl=en#play=IsaQh2hUV74>,
>  
> not the Google API console.
>
> Regards,
> [image: Google Logo] 
> Ernie John Blanca Tacata 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2RxWIP:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads 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/901fd541-7f13-4873-a9ca-5ad7225332c5n%40googlegroups.com.
  • 40... Basil Latif
    • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
      • ... Basil Latif
        • ... 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum

Reply via email to