3

I am using an HTTP POST request to upload a file onto Google Cloud Storage.

Request is:

POST /upload/storage/v1beta1/b/myBucket/o?uploadType=media&name=testFile HTTP/1.1
Host: www.googleapis.com
Content-length: 24
Content-type: text/plain
Authorization: OAuth ba26.AHXXXXXXXXXVHXdVRAhBAHR_UXXXXXLV-MqPMXXXJwc

<BINARY DATA - 24B>

I am getting the following error as the response:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured"
   }
  ],
  "code": 403,
  "message": "Access Not Configured"
 }
}

Somewhere I read that I need to switch on Google Cloud Storage JSON API. Is it compulsory to switch on Google Cloud Storage JSON API or is there any other solution to fix this error?

4

1 回答 1

4

要使用 JSON API,必须启用它。访问Cloud Console,点击 API 并启用“Google Cloud Storage JSON API”来启用 JSON API

于 2013-04-29T21:24:19.033 回答