GET /2/tweets/compliance/stream
GET /2/tweets/compliance/stream
Connect to one of four partitiona of the Tweet compliance stream.
Endpoint URL
https://api.x.com/2/tweets/compliance/stream
Authentication and rate limits
Authentication methods supported by this endpoint | |
---|---|
Rate limit | App rate limit (Application-only): 100 requests per 15-minute window shared among all users of your app |
Query parameters
Name | Type | Description |
---|---|---|
partition Required | number | Must be set to 1, 2, 3 or 4. Tweet compliance events are split across 4 partitions, so 4 separate streams are needed to receive all events. |
backfill_minutes Optional | number | By passing this parameter, you can recover up to five minutes worth of data that you might have missed during a disconnection. The backfilled events will automatically flow through a reconnected stream, with older events generally being delivered before any newer events. You must include a whole number between 1 and 5 as the value to this parameter. nThis feature will deliver all events that published during the timeframe selected, meaning that if you were disconnected for 90 seconds, and you requested two minutes of backfill, you will receive 30 seconds worth of duplicate events. Due to this, you should make sure your system is tolerant of duplicate data. |
Example code with offical SDKs
TypeScript
Java
Example responses
Successful response
Response fields
Name | Type | Description |
---|---|---|
delete | string | A delete Tweet event. |
withheld | string | A withheld Tweet event. |
drop | string | A drop Tweet event. |
undrop | string | A undrop Tweet event. |
id | string | The ID of the Tweet triggering a compliance event. |
author_id | string | The ID of the author of a Tweet triggering a compliance event. |
event_at | date (ISO 8601) | Time of when event happended. |