0

LicenseAssignments.get API が 200 OK を返す

リクエスト:

GET https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/sku/Google-Apps-For-Business/user/<email>

応答:

200 OK

- Show headers -

{
    "kind": "licensing#licenseAssignment",
    "selfLink": "https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/sku/Google-Apps-For-Business/user/<email>",
    "userId": "<email>",
    "productId": "Google-Apps",
    "skuId": "Google-Apps-For-Business"
}

ただし、LicenseAssignments.listForProduct は「403 Forbidden」を返します。

リクエスト:

GET https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/users?customerId=my_customer

応答:

403 Forbidden

- Show headers -

{
    "error": {
    "errors": [
    {
    "domain": "global",
    "reason": "forbidden",
    "message": "Unauthorized operation for the given domain."
    }
    ],
    "code": 403,
    "message": "Unauthorized operation for the given domain."
    }
}

2 番目のリクエストで 403 が禁止される理由を教えてください。

4

1 に答える 1

2

この問題は、「ドメイン名」(something.com など) を「customerId」として使用すると解決しました。これは、「customerId」が「my_customer」である他の Google API の通常の動作とは異なります。

https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/users?customerId=<domain name>
于 2014-11-24T15:32:30.853 に答える