Webhook Errors in API

Good day

We had our demo app working with webhooks around Decemeber, we recently started the app up again but now the webhooks are failing to be created
Trying both via the app and in the developers api trial yield errors, posted below:

Error headers:

asana-change	name=cross_workspace_deprecation;info=https://forum.asana.com/t/change-get-projects-get-users-and-get-tags-will-require-a-workspace-or-team/1031581, name=new_user_task_lists;info=https://forum.asana.com/t/update-on-our-planned-api-changes-to-user-task-lists-a-k-a-my-tasks/103828, name=new_goal_memberships;info=https://forum.asana.com/t/launched-team-sharing-for-goals/378601;affected=true
cache-control	no-store
content-length	270
content-type	application/json; charset=UTF-8
date	Tue, 18 Mar 2025 00:37:17 GMT
pragma	no-cache	

Error body:

{
  "errors": [
    {
      "message": "The remote server which is intended to receive the webhook responded with an incorrect status code: 401",
      "help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors"
    }
  ]
}
1 Like

Hmmm… @John_Vu @Andrew-asana ?

Hi @Jacques_van_der_West,

I don’t have visibility on your demo app or how you’ve built it but, based on the error message you received:

“The remote server which is intended to receive the webhook responded with an incorrect status code: 401”

It probably has something to do with you needing to re-establish a new webhook.

You mentioned that you “recently started the app up again” this probably means your webhook server was not running for some period of time. If your app tries to reconnect to an old webhook hook that you established you could probably run into this error.

What API call does your app make that gave you this error message? Is your app returning 401 error code to Asana’s webhook heartbeat events?

Hi All,

I’m one of the devs working with Jacques. So I can help answer some questions.

In terms of establishing the webhook, we check to see if there is an existing webhook (currently nothing). Then if there’s nothing we create the webhook and this is where we are getting the above mentioned error

Currently using the node package, “asana”: “^3.0.16”. If we try with Establish a webhook it also produces the error

We are user ngrok to test the connection, not sure if that might affect it? Not receiving any calls to the server