我正在尝试通过 Box API 创建一个文件夹。这是我的请求的样子:
-------------- REQUEST --------------
POST https://api.box.com/2.0/folders/0
Accept-Encoding: gzip
Authorization: Bearer [hidden]
User-Agent: Google-HTTP-Java-Client/1.14.1-beta (gzip)
Content-Type: application/json; charset=UTF-8
Content-Length: 36
-------------- REQUEST BODY ----------
{"name":"test2","parent":{"id":"0"}}
-------------- RESPONSE --------------
HTTP/1.1 403 Forbidden
Date: Wed, 10 Apr 2013 21:15:53 GMT
Content-Length: 224
Content-Type: application/json
Connection: keep-alive
Server: nginx
Cache-Control: no-cache, no-store
-------------- RESPONSE BODY----------
{"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied - insufficient permission","request_id":"19725779175165d68967049"}
有人可以解释我的请求有什么问题吗?在对具有相同 Bearer 标头的其他请求的响应中,我收到了正确的结果:
-------------- REQUEST --------------
GET https://api.box.com/2.0/folders/0
Accept-Encoding: gzip
Authorization: Bearer [hidden]
User-Agent: Google-HTTP-Java-Client/1.14.1-beta (gzip)
-------------- RESPONSE --------------
HTTP/1.1 200 OK
Date: Wed, 10 Apr 2013 21:15:53 GMT
Transfer-Encoding: chunked
Content-Encoding: gzip
Content-Type: application/json
Connection: keep-alive
Server: nginx
Cache-Control: no-cache, no-store
我的应用程序被配置为请求读取和写入权限。