0

Is it possible to call rest API using PHP, inside GAE for putting data at pull queue ?? I am trying to call rest api to put data at pull queue but I get an error

Array
(
    [error] => Array
        (
            [errors] => Array
                (
                    [0] => Array
                        (
                            [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
        )

)
Zisu
  • 497
  • 2
  • 6
  • 25
  • it is possible, what you have is an `accessDenied` error. Did you authenticate properly? – DevDonkey Jan 21 '16 at 11:13
  • As authentication I send API_KEY and Authorization from header My target URL : https://content.googleapis.com/taskqueue/v1beta2/projects/s~PROJECT_NAME/taskqueues/TASK_QUEUE_NAME/tasks – Zisu Jan 21 '16 at 11:16
  • At local machine my code run successfully , but inside GAE it is not running – Zisu Jan 21 '16 at 11:29

1 Answers1

1

You might want to try my PHP Pull Queue library for App Engine. https://github.com/tomwalder/php-appengine-pull-queue

It's in very early ALPHA, but might work for you.

Removes the need for the REST API entirely. Uses native Google Protocol Buffers (same as the Python/Java/etc. runtimes)

Tom

Tom
  • 1,563
  • 12
  • 12
  • hi.. is there any way to list tasks using your library?? – Zisu Feb 03 '16 at 11:21
  • Not currently. Feel free to raise an issue on the GitHub repo asking for the feature. – Tom Feb 03 '16 at 11:23
  • I have posted a issue on the GitHub repo . https://github.com/tomwalder/php-appengine-pull-queue/issues/3 – Zisu Feb 03 '16 at 12:58
  • I have added a basic `listTasks()` method. https://github.com/tomwalder/php-appengine-pull-queue#list-tasks I've also added the ETA to the Task object. Not sure how this will play out on Live AppEngine, which is 32-bit only. I've not run any tests. – Tom Feb 03 '16 at 21:32
  • listTasks() method working well.. But my requirement is list and get tasks – Zisu Feb 04 '16 at 05:37
  • Please define your requirements in more detail. And probably over on GitHub – Tom Feb 04 '16 at 10:46