Users
User Likes
Fetch a user's liked tweets
POST /twitter/user/likes
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | User's auth token |
cursor | string | No | Pagination cursor |
Notes
- Fetches the user's own liked tweets.
- Pagination uses
next_cursoruntilhas_moreis false.
Response (200)
{
"userId": "1858475867762270208",
"tweet_count": 20,
"has_more": true,
"next_cursor": "DAAHCgABHAY...",
"likes": [
{
"type": "tweet",
"id": "2010705621524292007",
"text": "soon people will realize, claude code is a beast.",
"author": {
"userName": "druv_kotwani"
}
}
]
}Error Responses
400 - Missing auth_token
{
"error": "Missing required field: auth_token"
}401 - Invalid auth_token
{
"error": "Invalid auth_token - could not extract userId"
}Example
curl -X POST "https://api.getxapi.com/twitter/user/likes" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token"
}'
# With pagination
curl -X POST "https://api.getxapi.com/twitter/user/likes" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token",
"cursor": "DAAHCgABHAY..."
}'