0

주어진 도메인에 대한 의외의 :구글 기업 라이센스 관리자 API - LicenseAssignments.get API는 200 OK</p> <p>요청 반환

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 금지됨"

요청 :

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

응답 : 나는 403 번째 요청이 금지 된 이유를

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

어떤 생각?

+1

API 탐색기에서이 동작을 재현 할 수 있습니까? https://developers.google.com/admin-sdk/licensing/v1/reference/licenseAssignments/listForProduct. customerID와 productId가 모두 설정되어 있습니까? – Gerardo

+0

도메인 이름을 'customerId'로 사용하면이 문제가 해결되었습니다. 이는 customerId가 'my_customer'인 다른 API의 동작과 다릅니다. – Srik

답변

0

'도메인 이름'(예 : something.com)을 'customerId'로 사용하면이 문제가 해결되었습니다. 이것은 'customerId'가 'my_customer'인 다른 Google API의 일반적인 동작과 다릅니다.

https://www.googleapis.com/apps/licensing/v1/product/Google-Apps/users?customerId=<domain name>