X write
Twitter follow API: follow one X user by ID
Use the Twitter Follow API to follow one user by ID. Approve the connected account, poll the write action, handle limits, and verify the relationship.
- 200
- 202
- 400
- 401
- 402
- 403
- 409
- 422
- 429
- 500
- 503
POST
Twitter follow API: follow one X user by ID
Follow one Twitter user by ID
Use this Twitter API follow endpoint for 1 target user ID. Each Twitter API follow user request names 1 connected X account. Verify the target user ID. Approve the acting account before sending the action. Compare X’s separate Follow User endpoint.10 credits per call · All plans from $0.00012/credit
Authenticate and approve the follow
Send an Xquik API key or OAuth 2.1 bearer token. Never send an X password or session cookie. Show the target user ID, username, profile name, and acting account. Use the URLhttps://xquik.com/api/v1/x/users/{id}/follow in Python.
Start the sample with import requests.
Verify the Twitter follow API result
Store the target ID, acting account, action ID, and request hash. PollstatusUrl until terminal becomes true.
Close already-followed results without another request.
Use Check Follower when current proof matters.
Use Following to read outbound relationships.
Use Unfollow User to reverse approval.
Handle Twitter follow API errors
Fix the user ID or account after400.
Replace Xquik authentication after 401; reconnect after 403.
Add credits after 402; review rejected input after 422.
Honor Retry-After after 429.
After 500 or 503, check safeToRetry before retrying.
Twitter API follow questions
How do I follow a user programmatically?
Approve the target user ID and connected account. Send this POST request; poll the returned action until terminal.Can I follow a protected X account?
Protected X profiles may keep follows pending until approval. Verify the relationship before dependent work begins.Can I bulk follow Twitter users?
No bulk request exists here. Send 1 approved target ID per action and respect both limits above.Do I need a Twitter follow SDK?
No. Use any HTTP client or the cURL, Node.js, Python, and Go examples. A third-party app still needs an approved connected account.How do I check or undo a follow?
Use Check Follower for current proof. Use Unfollow User with new approval and a new idempotency key.Headers
string
Send
Bearer <token> instead of x-api-key when using OAuth 2.1.string
required
Unique key for this intended write. Reuse it only for an exact network replay.
string
required
Must be
application/json.Path parameters
string
required
The X user ID of the account to follow.
Body
string
required
X username or account ID of your connected account to act as.
Response
Durable write recovery
- Store
id, the nestedhashinrequest,billing, andstatusUrl. - Poll after
Retry-AfterorpollAfterMswhenterminalisfalse. - Trust
safeToRetryandnextActionbefore any new write.
200 Terminal or 202 active
Store terminal results. Poll active actions without creating another write.- After HTTP
200, store the result and settled billing. - After HTTP
202, poll the same action. Never submit another write. - After HTTP
400, fix the named field. Use a new idempotency key. - After HTTP
401, fix authentication. Do not retry unchanged. - After HTTP
402, fund the account before another write. - After HTTP
403, reconnect the account. - After HTTP
409, keep the original action. Use a new key for new input. - After HTTP
422, fix the rejected request before retrying. - After HTTP
429, wait forRetry-After. Preserve the same key. - After HTTP
500, retry only whensafeToRetryistrue. - After HTTP
503, poll whileterminalisfalse.
- 200
- 202
- 400
- 401
- 402
- 403
- 409
- 422
- 429
- 500
- 503
Twitter follow API: follow one X user by ID