Error while creating webhook for a project


#1

Hi,

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?
  • How Asana handle webhook removal?

Webhook limit of 200 per token
#2

I’m not sure about webhook limits. @Joe_Trollo @Jeff_Schneider @Matt_Bramlage may be able to weigh in.

Not sure exactly what you mean by “how handle webhook removal?” You can definitely delete a webhook using:


#3

Thanks for your response.

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.


#4

I haven’t personally noticed any delays when I’ve deleted a webhook. Maybe the Asana API guys mentioned above can provide more info.


#5

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 200 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.


Webhook limit of 200 per token
#6

Thank you for your detailed response.

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).


#7

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.


#8

Thanks for the clarification.

The confusion is Asana return the error message after send a handshake request.


If you needs anything from me, let me know.


#9

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?


#10

Sorry for my mistake :confused:

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)

#11

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?


#12

GET /webhooks returns empty list for different access_token.

I can create a new project, I was a bit obsessed the project :slight_smile: I will move on to new project :slight_smile:

@Phil_Seeman, @Joe_Trollo, thank you for your time and support