Hi Yasar,

Thanks for the info. But I still can't get this to work.

Where are you checking the logs?

I set the following in the header:
login-customer-id: <  manager ID found in the top right-hand corner of the 
screen when logged in>
developer-token: < This is the token I created using the manager ID set 
above>

I then send the following:
GET https://googleads.googleapis.com/v8/customers:listAccessibleCustomers

The response is:
{
  "error": {
    "status": "PERMISSION_DENIED", 
    "message": "The caller does not have permission", 
    "code": 403, 
    "details": [
      {
        "errors": [
          {
            "errorCode": {
              "authorizationError": "DEVELOPER_TOKEN_PROHIBITED"
            }, 
            "message": "Developer token is not allowed with project 
'407408718192'."
          }
        ], 
        "@type": 
"type.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure", 
        "requestId": "EB6r90sXKfuernRX9e1yJA"
      }
    ]
  }
}
On Thursday, September 23, 2021 at 6:29:30 PM UTC+2 adsapi wrote:

> Hi Brian,
>
> Thanks for posting your concern to us.
>
> Upon checking logs, it appears that you’ve encountered 
> *‘USER_PERMISSION_DENIED* 
> <https://developers.google.com/google-ads/api/docs/best-practices/common-errors?hl=en#user_permission_denied>'
>  error. 
> The ‘USER_PERMISSION_DENIED’ usually occurs due to incorrectly setting the 
> 'login-customer-id’ in the request or not specifying login-customer-id in 
> the request. Note that when a user doesn't have permission to access a 
> customer and you’re accessing a client customer then the manager's customer 
> ID must be set in the 'login-customer-id’ in the header request.
>
> To resolve this, you will need to ensure that your OAuth2 credentials 
> <https://developers.google.com/google-ads/api/docs/oauth/cloud-project> 
> were generated while logged in as the user / email address that has access 
> <https://support.google.com/google-ads/answer/1704346> to the customer ID 
> in your request. Also, if the said user / email address is one that has 
> access to the MCC / manager of the customer account, then you may specify 
> the MCC / manager account's ID as the login-customer-id 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid>
> .
>
> Furthermore, note that you received the *DEVELOPER_TOKEN_NOT_APPROVED* 
> <https://developers.google.com/google-ads/api/reference/rpc/v8/AuthorizationErrorEnum.AuthorizationError#developer_token_not_approved>
>  
> error when you tried to access the production accounts with the test 
> developer access. It is intended to get the error 
> DEVELOPER_TOKEN_NOT_APPROVED, since you would need to request for at least 
> a basic access 
> <https://developers.google.com/google-ads/api/docs/access-levels?hl=en#basic_access>
>  
> level for developer token if you would be making calls to your production 
> Google Ads accounts, by filling up and submitting this application form 
> <https://services.google.com/fb/forms/newtoken/>.
>
> For your question “What would be the url end point for getallcustomer?“, 
> you may use the *method: customers.listAccessibleCustomers* 
> <https://developers.google.com/google-ads/api/rest/reference/rest/v8/customers/listAccessibleCustomers?hl=en>
>  
> in order to return resource names of customers directly accessible by the 
> user authenticating the call.
>
> Could you share the documentation you were referring to when you mentioned 
> "OAuth 2.0 Playground not return any info if the "List possible operations" 
> button is pressed"?
>
> Regards, 
> [image: Google Logo] 
> Yasar 
> Google Ads API Team 
>   
>
> ref:_00D1U1174p._5004Q2OTOP6: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/cdd6585a-5e69-4f1e-a181-149111fa43f8n%40googlegroups.com.

Reply via email to