デリゲート招待を送れる相手を設定
cookie で指定したアカウントをデリゲートとして招待できる相手を選びます:Everyone(全員)、または OnlyFollowing(そのアカウントがフォローしているアカウントのみ)。保存した設定を返します。それ以外の値は X を呼び出さずに HTTP 422 を返し、X が変更を拒否した場合は理由付きで HTTP 400 を返します。TwexAPI の Bearer キーと、そのアカウントの有効な X Cookie または auth_token が必要です。
APIリファレンスに戻る
/Delegate Endpoints
POST
/twitter/delegate/invite_settingAPI 認証
AuthorizationBearer token · header必須TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
リクエストボディ
必須application/jsoncookiestring必須Authorized X session cookie or auth_token for the account the call acts for. Required in addition to the TwexAPI Bearer key.
min length 1
proxystring | anyプロパティを表示プロパティを非表示
Any of:
string
stringany
anyinvitation_settingstring必須Everyone, or OnlyFollowing to accept invitations only from accounts this account follows.
許可値:
EveryoneOnlyFollowingレスポンス
200Success
codeinteger必須msgstring必須dataobject必須プロパティを表示プロパティを非表示
invitation_settingstring必須許可値:
EveryoneOnlyFollowing400X rejected the request
codeinteger必須msgstring必須dataany[] | any必須プロパティを表示プロパティを非表示
Any of:
any[]
Array of
anyanyany
any403Authentication or credit access denied
codeinteger必須msgstring必須dataany[] | any必須プロパティを表示プロパティを非表示
Any of:
any[]
Array of
anyanyany
any422Invalid request
codeinteger必須msgstring必須dataany[] | any必須プロパティを表示プロパティを非表示
Any of:
any[]
Array of
anyanyany
any500Upstream or server error
codeinteger必須msgstring必須dataany[] | any必須プロパティを表示プロパティを非表示
Any of:
any[]
Array of
anyanyany
any⚡インタラクティブテストPOST
⚡インタラクティブテスト / Try APIPOSTLive Console
🌐対象サーバー:
https://api.twexapi.io● 本番環境レディ
✍️
書き込み操作の認証情報ガイド(TwexAPIキー + Twitter Cookie)
1. TwexAPIプラットフォームキー (Bearer Token): 下記の「API認証」に入力してください(API呼び出しと課金認証に使用)。
2. TwitterアカウントCookie: ツイート・いいね・フォロー等の書き込み操作のため、下記リクエストボディの cookie フィールドに対象TwitterアカウントのCookie(例: auth_token=...; ct0=...)を入力してください。
🔑API 認証
📝リクエストボディapplication/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
リクエスト例
curl -X POST "https://api.twexapi.io/twitter/delegate/invite_setting" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
"invitation_setting": "OnlyFollowing"
}'const response = await fetch("https://api.twexapi.io/twitter/delegate/invite_setting", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
"invitation_setting": "OnlyFollowing"
})
});import requests
response = requests.post(
"https://api.twexapi.io/twitter/delegate/invite_setting",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
"invitation_setting": "OnlyFollowing"
},
)レスポンス例
{
"code": 200,
"msg": "success",
"data": {
"invitation_setting": "OnlyFollowing"
}
}{
"code": 400,
"msg": "X rejected the request",
"data": null
}{
"code": 403,
"msg": "Authentication or credit access denied",
"data": []
}{
"code": 422,
"msg": "Invalid request",
"data": []
}{
"code": 500,
"msg": "Upstream or server error",
"data": null
}