1
votes

I am attempting to use the Google JSON API - taskqueue/v1beta2

https://developers.google.com/apis-explorer/#p/taskqueue/v1beta2/taskqueue.tasks.list

I am not able to successfully authenticate for this service using the API explorer. I can use other JSON APIs like the storage API under the same project & account. When I go the the APIs tab in the developer console there is nothing listed for "TaskQueue" or "TaskQueue JSON API".

Edit: The oauth flow seems to work correctly, with scopes: https://www.googleapis.com/auth/taskqueue https://www.googleapis.com/auth/taskqueue.consumer

No matter what I do I get a 403 Forbidden response. How can I authorize my account to use the TaskQueue API? Here is my response from the API explorer:

403 Forbidden

cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  146
content-type:  application/json; charset=UTF-8
date:  Mon, 19 Jan 2015 17:20:50 GMT
expires:  Mon, 19 Jan 2015 17:20:50 GMT
server:  GSE
vary:  Origin, X-Origin

{
 "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"
 }
}
1

1 Answers

2
votes

The REST API only works for pull queues, and you need to also specify the email address of the user you are authorizing as in your queue.yaml. From the docs:

queue:
- name: pull-queue
  mode: pull
  acl:
- user_email: [email protected]        # can list, get, lease, delete, and update   tasks
  - writer_email: [email protected] # can insert tasks
  - writer_email: [email protected]    # can insert tasks, in addition to rights granted by being a user_email above

Defining pull queues https://cloud.google.com/appengine/docs/python/config/queue#Python_Defining_pull_queues