I’m new in webhooks generally.
I have problem with CreateWebhook, i tried install Asan php sdk to Lumen framework (installed okay).
Token created in console (created app and there created token) - looks ok
Did this steps:
$client = Client::accessToken(‘token’);
$result = $client->webhooks->createWebhook([
‘resourse’ => ‘xxxxx’, //project_id got from url “app.asana .com/0/xxxxx/list”
‘target’ => ‘mydomain/api/tasks’
[‘opt_pretty’ => ‘true’]
But each time got error “Invalid Request”
For this start to checking/debug Requests inside SDK how it works and found answer on request “this message (“You should specify one of resource”)”
Also tried using just Curl also problem
curl -H "Authorization: Bearer xxxxxxxxxxtoken
-X POST https://app.asana.com/api/1.0/webhooks
“message”: “The remote server which is intended to receive the webhook responded with an incorrect status code: 405”
What i need from webhooks
- Asana calls our system via webhook using “skinny” events (see Asana API docs).
- These events are put into a queue (a table you will create).
- We then pull the details (projects/tasks/assignments/status) of those queued skinny events using Asana REST API.
- Data is stored in the database.
- Events are CRUD on projects, tasks, users, etc.
What is wrong, what i do wrong, please help me with this…
p.s. sorry for my english