Behind the scene: I scheduled a job for testing my project (the project mentioned above). The project removes all unnecessary webhooks at the end of the day.
In my project, When I try to create a webhook for a specific project, I get the following response with 403: Forbidden status:
{
"errors": [
{
"message": "This resource already has too many webhooks, and no more can be added to it.",
"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"
}
]
}
I want to ask:
Is there any limit for webhook creation for project? If yes, what is the limit?
I meant that after a webhook removal, how Asana remove webhook from itself? Does it remove the webhook immediately (as a part of remove request), or another job(may be scheduled job) remove it? I’m asking this question because I think, after a while may be I will be able create webhook.
Hi @molcay, I can help answer some of your questions.
A single authentication token is limited to a total of 10,000 active webhooks at any one time, and any given object in Asana is limited to 1000 active webhooks across all apps. When you remove a webhook by calling DELETE /webhooks/<webhook-id> it is deleted immediately as part of the request.
If your requests to create webhooks are being rejected, I’d first verify that you don’t have any active webhooks by calling GET /webhooks. If you haven’t hit the limit of 1000 webhooks, try making a webhook on a different project in case the original project has hit the limit of 1000 webhooks. If you’re still unable to make a webhook, let us know what you observed in these tests so we can better help.
I don’t understand exactly, the 200 webhooks limit belongs which resource(application, project, token)?
I want to clarify the term “A single Authentication token”. When a user authorize an app and the app get a token after OAuth process, this token is “a single Authentication token”, right?
When I try to get webhook list with GET /webhooks, I see that there is no webhook (data list is empty) in given workspace(webhooks endpoint requires workspace id). I tried to change project and I successfully create webhook for the newly selected project.
I inspect the creation process for failing request and I see that Asana sent handshake request and then failed after handshake (this can be irrelevant, though).
There is a limit of 10,000 webhooks per user per app. That is, a user of your app can make at most 10,000 webhooks through your app. “Per user per app” is also, in most cases, equivalent to “per auth token” because tokens are given out for a specific user and specific app.
I believe the failure you’re encountering is relevant—if the handshake process fails, the webhook is not created. If Asana sends the handshake at all, that means you have not hit any applicable limits. I would try to inspect and fix that failing handshake.
Oops, I think there was a miscommunication here - @Joe_Trollo did not mean that he was going to inspect the failing handshake; what he meant was “if I were you, I would inspect that failing handshake”. Part of his point was that you had said you thought the handshake faiure might be irrelevant, and he was saying, “no, it probably is relevant and you should focus on it”.
So, what is the specific failure information that you’re getting back, and at what point in the process are you getting it?
I’m trying to use ngrok in my local environment to follow steps for creating webhook.
I try to create a webhook for project other than the problematic project, I can see handshake request coming and response delivered to request successfully. (Response of the create webhook request contains created webhook details)
When I try to create webhook for the problematic project, I can see handshake request coming and response delivered to request successfully. (Response of the create webhook request contains error message -mentioned in first entry)
It sure sounds like you already have the limit of 1000 webhooks on that problem project.
@Joe_Trollo may have other suggestions but what I would recommend is to do a GET Webhooks call on that specific project and see if you do indeed get back 1000.
Also don’t forget
Emphasis mine - meaning that if you get back less than 1000 webhooks from the above call, is it possible there are other API tokens which have some webhooks established on that project?