Reputation: 195
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?
Upvotes: 3
Views: 1933
Reputation: 4688
To use the JSON API, it must be enabled. Enable the JSON API by visiting the Cloud Console, clicking APIs, and enabling the "Google Cloud Storage JSON API"
Upvotes: 4