开发者

GAE Python Pull Task Queue Example

I know the Pull Task Queue is still very new, but I've been looking at the documentation and I would love to start using it. I've added a pull task queue to my application in the queue.yaml file:

qu开发者_JAVA百科eue:
- name: pull-queue
  mode: pull
  acl:
  - user_email: {MY EMAIL}@gmail.com

but when I try to call it from the REST api using this link:

https://www.googleapis.com/taskqueue/v1beta1/projects/{PROJECT_NAME}/taskqueues/pull-queue/tasks

I get the following error:

{
  error: {
    errors: [
      {
        domain: "global"
        reason: "required"
        message: "Login Required"
        locationType: "header"
        location: "Authorization"
      }
    ]
    code: 401
    message: "Login Required"
  }
}

I imagine this is because I'm not authenticating with the REST api, but how do I do that? I can't find any documentation about authenticating with it.


Have you read the Pull Queue documentation? It links to a large number of client libraries, as well as command line tools that do the authentication for you.


I guess any google auth would work. ex. username/password or even oauth. You could take a look at the Contacts API for example


If your app is using High Replication Datastore (HRD), then your project name requires a prefix of 's~'; so if {PROJECT_NAME} is myproject, then you'd run the sample app using gtaskqueue --project_name=s~myproject

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜