How to register a webhook url in Twitter?



@SteveJonesGtr, yeap, it’s probably your ngrock tunnel. My teammate had a similar issue running a tunnel to his localhost. I don’t think location is going to be huge factor as we have developers up and running with webhooks in India, Middle East and Asia. Unfortunately, I’m not going to have an easy solution for tunnels. It’s a use case we have to discuss here. If you do find a fast tunneling service, please ping us.

As for a complicated solution you can do the following: Deploy a webapp that proxies requests to your ngrock tunnel. The webapp can handle the CRC GET request itself without proxying to your localhost. For POST requests the webapp should immediately respond with a 200 and then relay the request to your ngrock tunnel. You can achieve something similar with an AWS API Gateway and Lambda.


I am getting the same “Application cannot perform write actions.” message when trying to register a webhook with POST.

I’m using the application-only bearer token and using GET works on the same endpoint. We got the email saying we had been granted access to the beta API and the app has the read and write setting enabled.


@alans - It works if you use a user access token instead of application OAuth2 authentication. See this post by @joncipriano:

Make sure your webhook endpoint responds quickly. I was trying to connect to localhost via an ngrok tunnel, and it was too slow, so I was getting Webhook URL does not meet the requirements errors every time. I’ve since written and deployed a web app on Amazon AWS Lambda / API Gateway to handle the Twitter webhooks and now it’s working perfectly. I’ll be sharing that code on GitHub soon.


Thank you. I used the user access token and manage to post.

However I also get the “214: Webhook URL does not meet the requirements” error message. It appears the url is never called (I assume a CRC request is sent when adding a webhook)

Our test server has a different secure port - is specifying a port number in the webhook url not valid?



Couple of things to check.

  1. Have you checked your latency? I just used Pingdom to test my endpoint. If the resulting latency is > 1 second, your webhook endpoint fails the test
  2. Is your response application/json like this:
  "response_token": "sha256=x0mYd8hz2goCTfcNAaMqENy2BFgJJfJOb4PdvTffpwg="

Where the value is “sha256=” followed by a base64 encoded HMAC SHA256 hash of the incoming crc_token $_GET variable and your Twitter consumer secret.

If not, then you need to get the response into that format.


The issue was the port number in the webhook URL. Seems it is not valid to include it.


I also hit the same error with specified webhook port 8443 "214: Webhook URL does not meet the requirements"
I wonder if that is a bug or is it intended? Is Twitter going to support non-standard ports in webhook url?
As far as I know, many other Webhook APIs (e.g. Facebook, Viber, LINE) support non-standard ports.


Yes I have been granted access.


I am getting the same issue as @mergenearellano

[{“code”:261,“message”:"Application cannot perform write actions. Contact Twitter Platform Operations through"}]

Can somebody help me?


I’ve heard this reported a few times now, we will have to look into what is happening here.


@lucas.asc, as mentioned earlier in this thread, please use OAuth1.0a with user access tokens to create the webhook config.


I’m using OAuth1.0a and getting this response. App id: 13780376

array(1) {
  ["errors"] => array(1) {
    [0] => array(2) {
      ["code"] => int(87)
      ["message"] => string(47) "Client is not permitted to perform this action."

Adding webhook url doesn't work

Hey @DanielCHood,

That error means your app hasn’t been granted the permission to use the API. I see a record for your name and that we granted access, though. I’ll follow up with the right folks here and I would expect this to be resolved by eod next Monday if not earlier.


Hi all, in an attempt to keep things tidy I’ll be locking this thread and summarizing the issues/solutions below for newcomers. if you are still having issues, please start a new thread with the webhooks tag, so we can address your specific issue. Thanks you for your participation and your patience as we improve the developer experience through this beta.

Error Code 87: Client is not permitted to perform this action.

This error means your app has not been whitelisted for access. Please apply using this form. If you applied and received a confirmation email that you have been granted access, please provide your app ID and name/company and we’ll look into it.

Error Code 261: Application cannot perform write actions. Contact Twitter Platform Operations through

If you received this error, try using OAuth1.0a with user access tokens of the owner of the application. If you are still receiving this error, follow through with Platform Operations with the provided link in the error message.

Error Code 214: Webhook URL does not meet the requirements. Please consult:

This can be caused by the following reasons:

  • Invalid CRC token or response format. Token is incorrect or invalid json format.
  • High latency on CRC GET request. Your webhook should respond in less than 3 seconds. Can be caused by a slow tunnel or misconfiguration of SSL.
  • Non-200 response code to CRC GET request (i.e. 404, 500, etc).

This has been noted as an area for improved error messaging and documentation.

Unable to setup Webhook -- "URL" is not valid
Twitter webhook registration
Account Activity API Issue
Unable to register/unregister/list webhooks for application
Can't setup a webhook,i keep getting this message: {"errors":[{"code":87,"message":"Client is not permitted to perform this action."}]}
Unable to register webhook URL, getting 214 error message
Registering a webhook url with app owner access token: 32 - Could not authenticate you
Webhook Registration Failed, throwing an erro "code": 32, "message": "Could not authenticate you."
"Application cannot perform write actions" on newly granted access to environments