Overview
Real-time delivery
Receive events instantly
Push-based
Data sent to your server
Efficient
No polling required
Reliable
Retry and recovery support
Webhook types
| Type | Description |
|---|---|
| Filtered Stream Webhooks | Receive filtered stream Posts via webhook |
| Account Activity API | Receive account activity events |
How webhooks work
- Event occurs — A user posts, sends a DM, etc.
- X sends request — POST request to your webhook URL
- You process — Your server handles the event
- Respond 200 — Return 200 OK to acknowledge
Webhook requirements
| Requirement | Description |
|---|---|
| HTTPS | Webhook URL must use HTTPS |
| Public | URL must be publicly accessible |
| Fast response | Respond within 10 seconds |
| 200 OK | Return 200 status to acknowledge |
Security
Challenge-Response Check (CRC)
X validates your webhook by sending a CRC request. Respond with an HMAC-SHA256 hash:Signature verification
Verify webhook authenticity using thex-twitter-webhooks-signature header.
Getting started
Prerequisites
- An approved developer account
- A Project and App in the Developer Console
- A publicly accessible HTTPS endpoint