curl --request POST \
--url https://api.twexapi.io/twitter/post-tweet-without-cookie \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tweet_content": "Hello, Twitter! 🐦",
"media_url": "https://example.com/image.jpg",
"media_urls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"schedule": "2024-01-01T12:00:00Z",
"reply_tweet_id": "1234567890123456789",
"community_name": "Python Developers or 1234567890123456789",
"quote_tweet_url": "https://twitter.com/user/status/1234567890123456789"
}
'import requests
url = "https://api.twexapi.io/twitter/post-tweet-without-cookie"
payload = {
"tweet_content": "Hello, Twitter! 🐦",
"media_url": "https://example.com/image.jpg",
"media_urls": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
"schedule": "2024-01-01T12:00:00Z",
"reply_tweet_id": "1234567890123456789",
"community_name": "Python Developers or 1234567890123456789",
"quote_tweet_url": "https://twitter.com/user/status/1234567890123456789"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tweet_content: 'Hello, Twitter! 🐦',
media_url: 'https://example.com/image.jpg',
media_urls: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
schedule: '2024-01-01T12:00:00Z',
reply_tweet_id: '1234567890123456789',
community_name: 'Python Developers or 1234567890123456789',
quote_tweet_url: 'https://twitter.com/user/status/1234567890123456789'
})
};
fetch('https://api.twexapi.io/twitter/post-tweet-without-cookie', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.twexapi.io/twitter/post-tweet-without-cookie",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tweet_content' => 'Hello, Twitter! 🐦',
'media_url' => 'https://example.com/image.jpg',
'media_urls' => [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
'schedule' => '2024-01-01T12:00:00Z',
'reply_tweet_id' => '1234567890123456789',
'community_name' => 'Python Developers or 1234567890123456789',
'quote_tweet_url' => 'https://twitter.com/user/status/1234567890123456789'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twexapi.io/twitter/post-tweet-without-cookie"
payload := strings.NewReader("{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.twexapi.io/twitter/post-tweet-without-cookie")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twexapi.io/twitter/post-tweet-without-cookie")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"tweet_id": "1234567890123456789",
"user_id": "1234567890",
"code": 200
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Post Tweet (Auto Cookie)
Post a tweet using a random cookie from the pool, cookie management $0.0025 per call.
curl --request POST \
--url https://api.twexapi.io/twitter/post-tweet-without-cookie \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tweet_content": "Hello, Twitter! 🐦",
"media_url": "https://example.com/image.jpg",
"media_urls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"schedule": "2024-01-01T12:00:00Z",
"reply_tweet_id": "1234567890123456789",
"community_name": "Python Developers or 1234567890123456789",
"quote_tweet_url": "https://twitter.com/user/status/1234567890123456789"
}
'import requests
url = "https://api.twexapi.io/twitter/post-tweet-without-cookie"
payload = {
"tweet_content": "Hello, Twitter! 🐦",
"media_url": "https://example.com/image.jpg",
"media_urls": ["https://example.com/image1.jpg", "https://example.com/image2.jpg"],
"schedule": "2024-01-01T12:00:00Z",
"reply_tweet_id": "1234567890123456789",
"community_name": "Python Developers or 1234567890123456789",
"quote_tweet_url": "https://twitter.com/user/status/1234567890123456789"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tweet_content: 'Hello, Twitter! 🐦',
media_url: 'https://example.com/image.jpg',
media_urls: ['https://example.com/image1.jpg', 'https://example.com/image2.jpg'],
schedule: '2024-01-01T12:00:00Z',
reply_tweet_id: '1234567890123456789',
community_name: 'Python Developers or 1234567890123456789',
quote_tweet_url: 'https://twitter.com/user/status/1234567890123456789'
})
};
fetch('https://api.twexapi.io/twitter/post-tweet-without-cookie', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.twexapi.io/twitter/post-tweet-without-cookie",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tweet_content' => 'Hello, Twitter! 🐦',
'media_url' => 'https://example.com/image.jpg',
'media_urls' => [
'https://example.com/image1.jpg',
'https://example.com/image2.jpg'
],
'schedule' => '2024-01-01T12:00:00Z',
'reply_tweet_id' => '1234567890123456789',
'community_name' => 'Python Developers or 1234567890123456789',
'quote_tweet_url' => 'https://twitter.com/user/status/1234567890123456789'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.twexapi.io/twitter/post-tweet-without-cookie"
payload := strings.NewReader("{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.twexapi.io/twitter/post-tweet-without-cookie")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.twexapi.io/twitter/post-tweet-without-cookie")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tweet_content\": \"Hello, Twitter! 🐦\",\n \"media_url\": \"https://example.com/image.jpg\",\n \"media_urls\": [\n \"https://example.com/image1.jpg\",\n \"https://example.com/image2.jpg\"\n ],\n \"schedule\": \"2024-01-01T12:00:00Z\",\n \"reply_tweet_id\": \"1234567890123456789\",\n \"community_name\": \"Python Developers or 1234567890123456789\",\n \"quote_tweet_url\": \"https://twitter.com/user/status/1234567890123456789\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"tweet_id": "1234567890123456789",
"user_id": "1234567890",
"code": 200
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Parameters for posting a tweet without providing cookie (uses random cookie from pool)
Content of the tweet to post
"Hello, Twitter! 🐦"
Single media URL (backward compatible). Prefer media_urls for multiple images.
"https://example.com/image.jpg"
Media URLs to attach (max 4 images). Cannot mix with video.
4[
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
]
Schedule time for the tweet in ISO format
"2024-01-01T12:00:00Z"
ID of tweet to reply to
"1234567890123456789"
Name of Twitter community to post in or community id
"Python Developers or 1234567890123456789"
URL of tweet to quote
"https://twitter.com/user/status/1234567890123456789"