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

ユーザー名の変更

cookie で指定したアカウントの @ユーザー名(screen name)を変更します。TwexAPI はまず X に新しいユーザー名が使えるかを確認します。すでに使われている場合は 409、X が受け付けない場合(短すぎる・予約語・使用不可など)は X の理由とともに 400 を返し、どちらの場合も何も変更しません。成功すると X が保存したユーザー名を返します。表示名の変更には POST /twitter/profile を使ってください。TwexAPI の Bearer キーと、そのアカウントの有効な X Cookie または auth_token が必要です。

APIリファレンスに戻る
/Twitter Profile Actions Endpoints
POST/twitter/profile/username
API 認証
AuthorizationBearer token · header必須
TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
リクエストボディ
必須application/json
cookiestring必須
ユーザー自身が承認した Twitter セッション資格情報または auth_token(BYOC — Bring Your Own Cookie)。機密情報は保存されず、完全なステートレスプロキシとして実行されます。詳細は [認証・セキュリティガイド](/ja/authentication#write-operations--byoc-bring-your-own-cookie) および [Cookie 取得手順](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie) を参照。
usernamestring必須
新しいユーザー名:英数字とアンダースコアで最大 15 文字。先頭の @ は無視されます。
matches ^\s*@?[A-Za-z0-9_]{1,15}\s*$
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
プロパティを表示
Any of:
string
string
any
any
レスポンス
200Username changed
codeinteger必須
msgstring必須
dataobject必須
プロパティを表示
usernamestring必須
The username X saved.
400Invalid username, or X will not accept it
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
401X could not authenticate the account
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
403The account is suspended or locked, or authentication or quota was denied
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
409The username is already taken
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
429Rate limit exceeded
codeinteger必須
msgstring必須
dataany[] | any必須
プロパティを表示
Any of:
any[]
Array of any
any
any
any
500X did not confirm the change, or a server error occurred
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/profile/username" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
  "username": "new_handle"
}'
レスポンス例
{
  "code": 200,
  "msg": "success",
  "data": {
    "username": "new_handle"
  }
}