Webhooks + Could not authenticate you


#1

I think I am facing the same problem described on this post: Webhooks + Could not authenticate you

I get {“errors”:[{“code”:32,“message”:“Could not authenticate you.”}]} after trying to register a webhook. I am using this application (https://github.com/twitterdev/twitter-webhook-boilerplate-node/) to generate the calls (node example_scripts/webhook_management/create-webhook-config.js).

Do I need the authorization from developer.twitter? I have asked for authorization and I am in the waitlist. My twitter is a corporate account (@sti_chatbot)

Help is appreciated!!! :slight_smile:


#2

You’ll need to wait until your application is approved before you can register a webhook. We’re unable to provide time estimates for the approval process at this time.


#3

My application was approved and I have access to the API now.

However, when I try to register a webhook, I get the following error:

{“errors”:[{“code”:214,“message”:“Webhook URL does not meet the requirements. In
valid CRC token or json response format.”}]}

My webhook is a clone of https://github.com/twitterdev/twitter-webhook-boilerplate-node/ . So, I don´t think there is a problem related to the json response format or the response_token.

My webhook is deployed in Heroku and the latency is not a problem; it is working super fast.

Help is appreciated.


#4

Hello!

I would like to give a feedback about my problem with registering a webhook.

I had a really hard time to make it work. In the documentation (https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/guides/getting-started-with-webhooks), it is mentioned that the callback application must have an endpoint like https://mydomain.com/webhook/twitter, that supports GET for the CRC and POST for the events.

However, after many trials, I got that the correct URL is https://mydomain.com/twitter. Moreover, I used as an example to my application the twitterdev/twitter-webhook-boilerplate-node. This example application has incorrect urls (/webhooks/twitter). I don´t know if this application is managed by twitter.

So, I suggest the correction of the documentation and the example application. It took me many hours to find out the correct way to create a webhook…


#5

I’ve been running the Account Activity API Dashboard for several weeks now, and that also happens to implement the webhook at /webhook/twitter - I believe the correct path will depend on the specific code implementation.


#6

Good tip, @andypiper. I downloaded this application and it is working :slight_smile: . The other (twitterdev/twitter-webhook-boilerplate-node) has some problems (incorrect urls, not up to date).

Thank you!


#7

Thanks for pointing that out - we can look into it! sorry if that confused you.