Yeni Makale Taslağı Oluştur
Yeni Makale Taslağı Oluştur.
API Belgelerine Dön
/Article Endpoints
POST
/x/articles/draftAPI Yetkilendirmesi
AuthorizationBearer token · headerzorunluTwexAPI genel Bearer Token kimlik bilgisi. İstek başlığı: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
İstek Gövdesi
zorunluapplication/jsoncookiestringzorunluKullanı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.
Yanıtlar
200Başarılı Yanıt
codeintegerzorunluHTTP durum kodu (200 başarılı anlamına gelir)
msgstringzorunluYanıt mesajı (örn: 'success')
dataArticleDraftData | anyUç nokta tarafından döndürülen ana veri
Özellikleri gösterÖzellikleri gizle
Any of:
ArticleDraftData
article_idstringzorunluUnique article draft ID, required by all subsequent steps
preview_urlstringzorunluURL to preview the draft in X composer: https://x.com/compose/articles/edit/{article_id}
any
any422Parametre Doğrulama Hatası
detailValidationError[]Özellikleri gösterÖzellikleri gizle
Array of
ValidationErrorlocstring | integer[]zorunluÖzellikleri gösterÖzellikleri gizle
Array of
string | integerAny of:
string
stringinteger
integermsgstringzorunluYanıt mesajı (örn: 'success')
typestringzorunluinputanyctxobject429Daily tweet limit reached
500Server error
⚡Etkileşimli KonsolPOST
⚡Etkileşimli Konsol / API TestiPOSTLive 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
📝İstek Gövdesiapplication/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
İstek
curl -X POST "https://api.twexapi.io/x/articles/draft" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cookie": "string"
}'const response = await fetch("https://api.twexapi.io/x/articles/draft", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"cookie": "string"
})
});import requests
response = requests.post(
"https://api.twexapi.io/x/articles/draft",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"cookie": "string"
},
)Yanıt
{
"code": 0,
"msg": "string",
"data": {
"article_id": "string",
"preview_url": "string"
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}{
"code": 429,
"msg": "Daily tweet limit reached, please try again tomorrow."
}{
"code": 500,
"msg": "Internal server error"
}