コンテンツにスキップ
Twexapi
日本語
Esc
↑↓移動↵開く⌘Jプレビュー

デリゲート招待を送信

cookie で指定したアカウントの代理として操作できるよう、別の X アカウントを招待します。招待相手は username または user_id で指定し、role は Admin(既定)または Contributor です。成功すると招待相手のメンバー情報が status Pending で返り、招待相手は自分の cookie で承認エンドポイントを呼び出して承認します。招待相手の未指定、存在しないユーザー、自分自身への招待、または X が拒否した招待(例:BadRequest: DELEGATE_ERR_002)は理由付きで HTTP 400 を返します。TwexAPI の Bearer キーと、招待する側のアカウントの有効な X Cookie または auth_token が必要です。

POST/twitter/delegate/invite
API 認証
AuthorizationBearer token · header必須
TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
リクエストボディ
必須application/json
cookiestring必須
Authorized X session cookie or auth_token for the account sending the invitation. Required in addition to the TwexAPI Bearer key.
min length 1
proxystring | any
プロパティを表示
Any of:
string
string
any
any
usernamestring | any
プロパティを表示
Any of:
string
string
any
any
user_idstring | any
プロパティを表示
Any of:
string
string
any
any
rolestring | any
Role to grant. Defaults to Admin.
default: "Admin"
プロパティを表示
Any of:
string
string
any
any
レスポンス
200Success
codeinteger必須
msgstring必須
dataDelegateMember必須
プロパティを表示
user_idstring必須
screen_namestring必須
namestring必須
avatarstring | any必須
Profile image URL.
プロパティを表示
Any of:
string
string
any
any
membership_idstring | any必須
ID of this membership in the delegation group.
プロパティを表示
Any of:
string
string
any
any
rolestring | any必須
Admin or Contributor.
プロパティを表示
Any of:
string
string
any
any
statusstring | any必須
Accepted, or Pending while the invitation is not yet accepted.
プロパティを表示
Any of:
string
string
any
any
400BadRequest: DELEGATE_ERR_002
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
403Authentication or credit access denied
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
422Invalid request
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
500Upstream or server error
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
⚡インタラクティブテストPOST
⚡インタラクティブテスト / Try APIPOST
Live 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" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
  "username": "example_member",
  "role": "Admin"
}'
レスポンス例
{
  "code": 200,
  "msg": "success",
  "data": {
    "user_id": "1234567890123456790",
    "screen_name": "example_member",
    "name": "Example Member",
    "avatar": "https://pbs.twimg.com/profile_images/example_normal.jpg",
    "membership_id": "1234567890123456791",
    "role": "Admin",
    "status": "Pending"
  }
}