Tweets
Retweet Tweet
Retweet a tweet programmatically via API. $0.001 per call. GetXAPI retweet endpoint documentation with code examples.
POST
/twitter/tweet/retweetThis endpoint costs $0.001 per API call.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
auth_token | string | Yes | User's auth token |
ct0 | string | No | Optional current CSRF token cookie. When provided with twid, skips server-side credential resolution. |
twid | string | No | Optional current user ID cookie, for example u=1234567890. Must be provided with ct0. |
tweet_id | string | Yes | Tweet id to retweet |
proxy | string | No | Proxy URL (http://, https://, socks5://, or socks4://) |
Notes
- If you already have current
ct0andtwid, send both to skip the extra server-side credential bootstrap fromauth_token. If either one is omitted, the server resolves them fromauth_tokenas before. Stale or invalid supplied values are not validated upfront and may fail on the actual Twitter action instead of returning an early401. - Retweets a tweet for the auth token owner.
- If X does not confirm the retweet action, this endpoint returns
502.
Response (200)
{
"status": "success",
"msg": "Retweeted successfully",
"data": {
"tweetId": "2019264360682778716",
"retweetId": "2019384131067818211",
"retweeted": 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 - Retweet not confirmed by X
{
"error": "Retweet failed - Twitter did not confirm the retweet"
}Example
curl -X POST "https://api.getxapi.com/twitter/tweet/retweet" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"auth_token": "your_auth_token",
"tweet_id": "2019264360682778716"
}'