İçeriğe geç
Twexapi
Türkçe
Esc
↑↓gezin↵aç⌘Jönizle

Create a Tweet or Reply

Posts a new tweet. To create a reply, provide the reply_tweet_id. This endpoint does not handle quote tweets,$0.0005 per call.

API Belgelerine Dön
/Tweet Actions Endpoints
POST/twitter/tweets/create
API Yetkilendirmesi
AuthorizationBearer token · headerzorunlu
TwexAPI genel Bearer Token kimlik bilgisi. İstek başlığı: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Başlık Parametreleri
Idempotency-Keystring
İsteğe bağlı. Her gönderi için benzersiz bir değer (UUID gibi, 1–255 görünür ASCII karakter). Aynı anahtar ve gövdeyle 24 saat içinde yeniden denemek, tekrar gönderi yapmak yerine ilk başarılı yanıtı Idempotent-Replayed: true header'ıyla döndürür ve ücretlendirilmez. Aynı anahtar farklı gövdeyle 422 döndürür.
min length 1 · max length 255
İstek Gövdesi
zorunluapplication/json
media_urlstring | any
Single media URL: image, GIF, or video. Prefer media_urls for multiple images.
Özellikleri göster
Any of:
string
string
any
any
media_urlsstring[] | any
Eklenecek görsel veya video URL listesi (maksimum 4 resim veya 1 video)
Özellikleri göster
Any of:
string[]
Array of string
string
any
any
tweet_contentstringzorunlu
Tweet veya yanıt içeriği
delegated_account_usernamestring | any
delegated account username
Özellikleri göster
Any of:
string
string
any
any
schedulestring | any
Schedule time for the tweet in ISO format
Özellikleri göster
Any of:
string
string
any
any
reply_tweet_idstring | any
Yanıt verilecek hedef tweet ID'si
Özellikleri göster
Any of:
string
string
any
any
cookiestringzorunlu
Kullanıcının kendi yetkilendirilmiş Twitter oturum kimlik bilgileri veya auth_token (BYOC — Bring Your Own Cookie). Sıfır kimlik bilgisi saklama ile durum bilgisi olmayan proxy yürütmesi. [Kimlik Doğrulama Güvenliği](/tr/authentication#write-operations--byoc-bring-your-own-cookie) ve [Cookie Nasıl Alınır](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie) sayfasına bakın.
community_namestring | any
Name of Twitter community to post in or community id
Özellikleri göster
Any of:
string
string
any
any
proxystring | any
The proxy to use.Please use high-quality residential proxies and avoid free proxies.Required.Example: http://username:password@ip:port . You can get proxy from: https://app.proxy-cheap.com/r/qiMxub
Özellikleri göster
Any of:
string
string
any
any
Yanıtlar
200The ID and user ID of the newly created tweet.
codeinteger
HTTP durum kodu (200 başarılı anlamına gelir)
default: 200
msgstring
Yanıt mesajı (örn: 'success')
default: "success"
dataPostTweetData | any
Uç nokta tarafından döndürülen ana veri
Özellikleri göster
Any of:
PostTweetData
tweet_idstring | any
Tweetin benzersiz ID'si
Özellikleri göster
Any of:
string
string
any
any
user_idstring | any
Kullanıcının benzersiz Twitter ID'si
Özellikleri göster
Any of:
string
string
any
any
codeinteger
HTTP durum kodu (200 başarılı anlamına gelir)
default: 200
any
any
409Aynı Idempotency-Key ile yapılan bir istek hâlâ çalışıyor. Daha sonra aynı anahtarla yeniden deneyin.
422Parametre Doğrulama Hatası
detailValidationError[]
Özellikleri göster
Array of ValidationError
locstring | integer[]zorunlu
Özellikleri göster
Array of string | integer
Any of:
string
string
integer
integer
msgstringzorunlu
Yanıt mesajı (örn: 'success')
typestringzorunlu
inputany
ctxobject
⚡Etkileşimli KonsolPOST
⚡Etkileşimli Konsol / API TestiPOST
Live Console
🌐Hedef Sunucu:https://api.twexapi.io
● Canlı Ortam Hazır
✍️
Yazma İşlemi Kimlik Kılavuzu (TwexAPI Anahtarı + Twitter Çerezi)

1. TwexAPI Anahtarı (Bearer Token): İstek faturalandırması ve kimlik doğrulama için aşağıdaki "API Yetkilendirmesi"ne girin.

2. Twitter Hesabı Çerezi: Yazma işlemleri için (tweet, beğeni, takip), aşağıdaki cookie alanına hedef hesabın Çerezini (örn. auth_token=...; ct0=...) girin.

🔑API Yetkilendirmesi
⚙️Parametreler (1)
📝İstek Gövdesiapplication/json
📡
暂无响应数据

请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。

İstek
curl -X POST "https://api.twexapi.io/twitter/tweets/create" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "media_url": "https://example.com/image.jpg",
  "media_urls": [
    "https://example.com/image1.jpg",
    "https://example.com/image2.jpg"
  ],
  "tweet_content": "Hello, Twitter! 🐦",
  "delegated_account_username": "elonmusk",
  "schedule": "2024-01-01T12:00:00Z",
  "reply_tweet_id": "1234567890123456789",
  "cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
  "community_name": "Python Developers or 1234567890123456789",
  "proxy": "http://username:password@ip:port"
}'
Yanıt
{
  "code": 200,
  "msg": "success",
  "data": {
    "tweet_id": "1234567890123456789",
    "user_id": "1234567890",
    "code": 200
  }
}