Skip to content
Twexapi
English
Esc
↑↓navigate↵open⌘Jpreview

Accept a Delegate Invitation

Accept a pending invitation for the account identified by cookie. Use membership_id from the invitations endpoint or username of the inviting account. A non-empty membership_id takes precedence over username, with no username fallback if the ID is not found. If neither selector is provided, acceptance occurs only when exactly one invitation is pending. No match, no invitations, or multiple invitations without a selector returns HTTP 500 in the current implementation. Success returns the selected invitation metadata. Requires a TwexAPI Bearer key and the recipient account’s authorized X credentials.

Back to API Reference
/Delegate Endpoints
POST/twitter/delegate/accept
Authorization
AuthorizationBearer token · headerrequired
Global API Bearer Token for TwexAPI. Included as: Authorization: Bearer <YOUR_TWEXAPI_KEY>.
Request Body
requiredapplication/json
cookiestringrequired
Authorized X session cookie or auth_token for the account receiving the invitation. Required in addition to the TwexAPI Bearer key.
min length 1
proxystring | any
Show properties
Any of:
string
string
any
any
usernamestring | any
Show properties
Any of:
string
string
any
any
membership_idstring | any
Show properties
Any of:
string
string
any
any
Responses
200Success
codeintegerrequired
msgstringrequired
dataDelegateInviterequired
Show properties
membership_idstringrequired
rolestringrequired
screen_namestringrequired
Username of the account that sent the delegation invitation.
namestringrequired
user_idstringrequired
403Authentication or credit access denied
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
422Invalid request
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
500Upstream or server error
codeintegerrequired
msgstringrequired
dataany[] | anyrequired
Show properties
Any of:
any[]
Array of any
any
any
any
⚡Interactive ConsolePOST
⚡Interactive Console / Try APIPOST
Live Console
🌐Target Server:https://api.twexapi.io
● Production Ready
✍️
Write Operation Credentials Guide (TwexAPI Key + Twitter Cookie)

1. TwexAPI Platform Key (Bearer Token): Enter under "API Authorization" below for request billing & authentication.

2. Twitter Account Cookie: For write operations (tweet, like, follow, etc.), provide the target Twitter account's Cookie (e.g. auth_token=...; ct0=...) in the cookie field of Request Body below.

🔑API Authorization
📝Request Bodyapplication/json
📡
No Response Yet

Configure parameters in the Request tab and click Send Request below.

Request
curl -X POST "https://api.twexapi.io/twitter/delegate/accept" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "cookie": "YOUR_X_COOKIE_OR_AUTH_TOKEN",
  "membership_id": "1234567890123456789"
}'
Response
{
  "code": 200,
  "msg": "success",
  "data": {
    "membership_id": "1234567890123456789",
    "role": "Contributor",
    "screen_name": "example_owner",
    "name": "Example Owner",
    "user_id": "1234567890123456788"
  }
}