Hi! I am new to webhooks and APIs… I am trying to connect my Asana to a webhook.
I don’t know where do I get my resouce paramtater. Can someone help me out?
I am getting this error:
“errors”: [
{
"message": "You should specify one of resource",
"help": "For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors"
}
]
The resource is the ID of the Asana object - task, project, team, workspace, etc. - that you’re creating the webhook for.
1 Like
Can you help me out?
I’m using postman in establishing webhook to zoho flow. I’m still new to this. I inputted my workspace ID as the value of my resource.
Here’s the new error:
{
"errors": [
{
"message": "Unrecognized request field `resource`. The only allowed keys at the top level are: data, options. Is it possible you did not wrap object properties in a `data` object?",
"help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors"
}
]
}
I am also getting this… I would be very thankful if someone can help me out. I am still new at this.
{
"errors": [
{
"message": "Could not parse request data, invalid JSON",
"help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors"
}
]
}
As it says, you need to wrap your webhook request call in a ‘data’ JSON object, like this for example - i.e. note how the whole thing is enclosed in data { }
{
"data": {
"filters": [
{
"action": "changed",
"fields": [
"due_at",
"due_on",
"dependencies"
],
"resource_subtype": "milestone",
"resource_type": "task"
}
],
"resource": "12345",
"target": "https://example.com/receive-webhook/7654?app_specific_param=app_specific_value"
}
}
Am getting the same error using postman form-data.
as resource I set the project gid.
You’re specifying target
and resource
in the wrong place. They don’t go as Headers but go as a JSON structure in the message body like:
For using Postman for testing, you should download the request collection that Asana has already built as templates (that’s where my screenshot came from) - you can get it here: Postman Collection
Hi, Where can I find the ID of resource task?
Hi @Karan_Kundra,
There are lots of ways, it just depends on your specific use case. There are API endpoints that return lists of tasks in a project and other lists of tasks, all of which can get you the task IDs. You can also get it from the web UI, either via the “Copy task link” button or the browser address bar.