REST call returns 403 "Access Not Configured" even though I've enabled Compute Engine API

2,326 views
Skip to first unread message

Doug Richardson

unread,
Jan 8, 2014, 12:27:53 AM1/8/14
to gce-dis...@googlegroups.com
I'm trying to use the OAuth playground to make REST calls to Google compute. No matter what I do, I get an error. As a simple example, when I try to list zones here's what happens:

Request

GET /compute/v1/projects/molten-seat-454/zones HTTP/1.1
Content-length: 0
Authorization: <HIDDEN>
Response
HTTP/1.1 403 Forbidden
Content-length: 357
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Wed, 08 Jan 2014 05:14:16 GMT
Server: GSE
Cache-control: private, max-age=0
Date: Wed, 08 Jan 2014 05:14:16 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
 }
}

OAuth Playground

Notes
- In cloud.google.com/console I have enabled the Google Compute Engine API and Google Cloud Storage API.
- I have enabled billing for the account.
- In oauthplayground, I've selected the following scopes:

However, when I try to view VM Instances I see this:
Server request failed: API rate limit exceeded

Brian Dorsey

unread,
Jan 8, 2014, 2:04:38 PM1/8/14
to Doug Richardson, gce-dis...@googlegroups.com

On Tue, Jan 7, 2014 at 9:27 PM, Doug Richardson <dougie.r...@gmail.com> wrote:
I'm trying to use the OAuth playground to make REST calls to Google compute. No matter what I do, I get an error.

Doug, thanks for reporting this. A colleague and I both see the same error on projects where Compute Engine is working normally. We'll look into what is going on with the OAuth Playground app. As an alternative, the APIs Explorer works well for me: 

Does APIs Explorer work for you on the project you reported trouble with in the other thread? If not, please email your project details to gc-...@google.com and we'll investigate. 

Take care,
-Brian

Douglas Richardson

unread,
Jan 8, 2014, 9:54:53 PM1/8/14
to Brian Dorsey, gce-dis...@googlegroups.com
Thanks Brian. APIs Explorer works perfectly (I'm Google API n00b and didn't even know it existed until you mentioned it).

It did not, however, solve the issue in my other thread, though I was able to get that resolved as well.

Troy Collinsworth

unread,
Jan 29, 2014, 10:47:41 PM1/29/14
to gce-dis...@googlegroups.com
I've tried to create a compute engine instance with the https://developers.google.com/oauthplayground and ttps://developers.google.com/apis-explorer with no luck. When using oauthplayground I get the same issue as described above. When I use apis-explorer I get server error.

500 Internal Server Error
- Show headers -
{
"error": {
"code": 500,
"message": null
}
}


Here is the json from the developers console:

POST https://www.googleapis.com/compute/v1/projects/unified-gift-474/zones/us-central1-a/instances { "kind": "compute#instance", "disks": [ { "kind": "compute#attachedDisk", "boot": true, "type": "PERSISTENT", "mode": "READ_WRITE", "deviceName": "test3", "zone": "https://www.googleapis.com/compute/v1/projects/unified-gift-474/zones/us-central1-a", "source": "https://www.googleapis.com/compute/v1/projects/unified-gift-474/zones/us-central1-a/disks/test3" } ], "networkInterfaces": [ { "kind": "compute#instanceNetworkInterface", "accessConfigs": [ { "name": "External NAT", "type": "ONE_TO_ONE_NAT" } ], "network": "https://www.googleapis.com/compute/v1/projects/unified-gift-474/global/networks/default" } ], "scheduling": { "automaticRestart": "true", "onHostMaintenance": "MIGRATE" }, "serviceAccounts": [ { "kind": "compute#serviceAccount", "email": "default", "scopes": [ "https://www.googleapis.com/auth/userinfo.email", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/datastore" ] } ], "zone": "https://www.googleapis.com/compute/v1/projects/unified-gift-474/zones/us-central1-a", "metadata": { "items": [] }, "machineType": "https://www.googleapis.com/compute/v1/projects/unified-gift-474/zones/us-central1-a/machineTypes/f1-micro", "name": "test3" }

Here is what the apis-explorer let me enter which doesn't support all the fields that were present in the developer console.


{
"name": "test3",
"kind": "compute#instance",
"disks": [
{
"type": "PERSISTENT",
"mode": "READ_WRITE",
"deviceName": "test3",
"boot": true,
"kind": "compute#attachedDisk"
}
],
"networkInterfaces": [
{
"accessConfigs": [
{
"name": "External NAT",
"type": "ONE_TO_ONE_NAT"
},
{
}
]
}
],
"scheduling": {
"automaticRestart": true,
"onHostMaintenance": "MIGRATE"
},
}

Jonathan Simon

unread,
Jan 30, 2014, 3:00:33 PM1/30/14
to gce-dis...@googlegroups.com
Hello Troy,

Did you check for error messages from the failed insert instance requests in the "Compute Engine -> Operations" section of the Developer Console? That should hopefully help track down why the insert instance request is failing.

--Jonathan

Troy Collinsworth

unread,
Jan 31, 2014, 9:31:30 AM1/31/14
to gce-dis...@googlegroups.com
Don't see anything related to the attempt to create an instance there.
Reply all
Reply to author
Forward
0 new messages