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."
    }
}

知道为什么我的第二个请求被禁止 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 回答