Managing webhooks and subscriptions

Creating & Changing Webhooks

In order to change webhook URLs, you must delete your existing webhook and then create a new one. Note that when you do this, you will be required to re-add the appropriate user subscriptions to the new webhook.

Webhook configuration management endoints

Create new webhook  POST account_activity/webhooks
Retreive the apps current webhook configuration
GET account_activity/webhooks
Delete the app’s current webhook configuration
DELETE account_activity/webhooks/:webhook_id
Manually trigger a CRC request
PUT account_activity/webhooks/:webhook_id

Why can’t I just update the webhook URL?

Why are webhook configurations immutable? Twitter takes security very seriously. If your webhook URL is changed, there is a possibility that your application consumer key and consumer secret have been compromised. By requiring you to create a new webhook configuration, you are also required to re-subscribe to your user’s events. This requires the use of access tokens that a malicious party is less likely to posses. As a result, the likelihood that another party will receive your user’s private information is reduced.

Adding & Removing User Subscriptions

During the beta, access to the API is provided up to 50 account subscriptions per webhook and up to one webhook per Twitter application. If you have a need for access beyond these levels, please let us know by providing more information using this form.

Subscription management endpoints

Add new user subscribtion
POST account_activity/webhooks/:webhook_id/subscriptions
Retreive a user subscription
GET account_activity/webhooks/:webhook_id/subscriptions
Remove a user subscription
DELETE account_activity/webhooks/:webhook_id/subscriptions