Hi,

I have been trying to figure this out now for about 3 weeks. Who would have 
thought that a REST API can be complicated. So I have tried many things to 
get this to work. In fact I can't even remember half the things I've tried.

But here goes.
I have a product manager account under which I have created a dev token. It 
is currently under level: Test account.

I then go the the OAuth 2.0 Playground
Step 1 - Select  https://www.googleapis.com/auth/adwords Then Authorize 
API's
            - I then select a manager account. The one used to create the 
dev token and           allow  access using this account
Step 2 - Exchange authorization code for token
Step 4 - In the headers I add developer-token and add the dev token. I also 
add login-customer-id = to the product managers Client ID

For the request URI I 
put: https://googleads.googleapis.com/v8/customers/{Test client ID}
It then returns. (I can even replace the Test client ID with the manager 
ID. It makes no differance) 

HTTP/1.1 403 Forbidden Content-length: 732 X-xss-protection: 0 
X-content-type-options: nosniff Transfer-encoding: chunked Request-id: 
-eaa2Fc5qZjn0EGFVEJkaA Vary: Origin, X-Origin, Referer Server: ESF 
-content-encoding: gzip Cache-control: private Date: Thu, 23 Sep 2021 
08:28:33 GMT X-frame-options: SAMEORIGIN Alt-svc: h3=":443"; 
ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; 
ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" 
Content-type: application/json; charset=UTF-8{
  "error": {
    "status": "PERMISSION_DENIED", 
    "message": "The caller does not have permission", 
    "code": 403, 
    "details": [
      {
        "errors": [
          {
            "errorCode": {
              "authorizationError": "USER_PERMISSION_DENIED"
            }, 
            "message": "User doesn't have permission to access customer. 
Note: If you're accessing a client customer, the manager's customer id must 
be set in the 'login-customer-id' header. See 
https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid
"
          }
        ], 
        "@type": 
"type.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure", 
        "requestId": "-eaa2Fc5qZjn0EGFVEJkaA"
      }
    ]
  }
}

If I replace the Test client ID with a production Client ID. I get
HTTP/1.1 403 Forbidden Content-length: 593 X-xss-protection: 0 
X-content-type-options: nosniff Transfer-encoding: chunked Request-id: 
vFtxYPFFlbkPLYz9dD4cBQ Vary: Origin, X-Origin, Referer Server: ESF 
-content-encoding: gzip Cache-control: private Date: Thu, 23 Sep 2021 
08:32:20 GMT X-frame-options: SAMEORIGIN Alt-svc: h3=":443"; 
ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; 
ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; 
ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" 
Content-type: application/json; charset=UTF-8{
  "error": {
    "status": "PERMISSION_DENIED", 
    "message": "The caller does not have permission", 
    "code": 403, 
    "details": [
      {
        "errors": [
          {
            "errorCode": {
              "authorizationError": "DEVELOPER_TOKEN_NOT_APPROVED"
            }, 
            "message": "The developer token is not approved. Non-approved 
developer tokens can only be used with test accounts."
          }
        ], 
        "@type": 
"type.googleapis.com/google.ads.googleads.v8.errors.GoogleAdsFailure", 
        "requestId": "vFtxYPFFlbkPLYz9dD4cBQ"
      }
    ]
  }
}

Which is expected.

What would be the url end point for getallcustomer? I want to send a 
request to see which customer ID's are linked to the test account. I'n this 
way I could try work out which text accounts I can access.

Any assistance with this would be greatly appreciated.

Just on a side note. Why does the OAuth 2.0 Playground not return any info 
if the "List possible operations" button is pressed  








-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/59fec27c-de4b-4131-9bb7-514ee64893e5n%40googlegroups.com.

Reply via email to