1

测试网址:https ://developers.google.com/apis-explorer/#p/storage/v1beta2/storage.objectAccessControls.insert

我已经发送了这样的请求:


Content-Type:  application/json
Authorization:  Bearer <AUTH TOKEN HERE>
X-JavaScript-User-Agent:  Google APIs Explorer

{

 "entity": "user-email",
 "role": "READER",
 "email": "WAITER@GMAIL.COM",
 "kind": "storage#objectAccessControl"
}

============================================

Response


400 Bad Request

- Show headers -

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

====================================== 谁能告诉我哪里出错了?谢谢~

4

1 回答 1

4

“实体”字段应该是“用户-”,然后是用户的电子邮件地址。

在您的情况下,正确的字段是:

{
  "entity": "user-waiter@gmail.com",
  "role": "READER"
}

这些都是您需要的字段。

于 2013-07-22T17:17:39.547 回答