GetXAPI
Tweets

Like Tweet

Like (favorite) a tweet programmatically via API. $0.001 per call. GetXAPI like tweet endpoint documentation with code examples.

POST/twitter/tweet/favorite

This endpoint costs $0.001 per API call.

Request Body

FieldTypeRequiredDescription
auth_tokenstringYesUser's auth token
tweet_idstringYesTweet id to like

Notes

  • Likes a tweet for the auth token owner.
  • If X does not confirm the like action, this endpoint returns 502.

Response (200)

{
  "status": "success",
  "msg": "Tweet liked successfully",
  "data": {
    "tweetId": "2019264360682778716",
    "liked": true
  }
}

Error Responses

400 - Missing fields

{
  "error": "Missing required field: tweet_id"
}

401 - Invalid auth_token

{
  "error": "Invalid auth_token - could not extract userId"
}

502 - Like not confirmed by X

{
  "error": "Like failed - Twitter did not confirm the action"
}

Example

curl -X POST "https://api.getxapi.com/twitter/tweet/favorite" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "auth_token": "your_auth_token",
    "tweet_id": "2019264360682778716"
  }'

On this page