Robin Westerlundh
Robin Westerlundh

Reputation: 874

Access Task Queue from GCE via cUrl

I'am trying to assess my GAE Task Queue from an GCE instant in the same project. I have started the instant with the correct scoop and billing is enabled:

"serviceAccounts": [
{
  "email": "[email protected]",
  "scopes": [
    "https://www.googleapis.com/auth/datastore",
    "https://www.googleapis.com/auth/devstorage.full_control",
    "https://www.googleapis.com/auth/taskqueue"
  ]
}

]

And i can generate an access token via this curl command:

curl "http://metadata/computeMetadata/v1/instance/service-accounts/default/token" -H "Metadata-Flavor: Google"

But when I try to curl to get the tasks using this curl I get an 403:

curl "https://www.googleapis.com/taskqueue/v1beta2/projects/propane-****/taskqueues/default/tasks" -H "Authorization":"Bearer ya29.lABIrcEaJi0ItloNb62Lg_***************"

Generates this output

"error": {
"errors": 
[
{
"domain": "global",
"reason": "forbidden",
"message": "you are not allowed to make this api call"
}
],
"code": 403,
"message": "you are not allowed to make this api call"

Upvotes: 0

Views: 362

Answers (1)

Robin Westerlundh
Robin Westerlundh

Reputation: 874

The problem was that i was using the default taskqueue, apparently that dose not work. Changes the taskqueue name to demo, and it all works.

Upvotes: 1

Related Questions