Follow a User API | Programmatic Twitter Follow
Follow a user as the authenticated account. Requires a logged-in session for the acting account. Billed at $0.0008 per call, the same as a standard read. Cost: $0.0008 per call.
Follow User follows an account on behalf of your own authenticated X account. It requires a registered X session, since the follow belongs to a real account, and returns ok:true when recorded. Pass the target's numeric user_id as a query parameter. This is a write action billed at $0.0008 per call, the same as a standard read.
Authorization
bearerAuth Pass your API key as a bearer token on every request: Authorization: Bearer <API_KEY>.
In: header
Query Parameters
Numeric ID of the user to follow.
Optional. Pass your own proxy (http(s)/socks URL) to egress the write through your clean IP for best success; if omitted, we use the session's proxy / our default.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/user/follow?user_id=44196397"{ "ok": true}{ "error": "bad_request", "message": "Missing or malformed parameter. Fix the request before retrying."}{ "error": "unauthorized", "message": "The API key is missing, malformed, or revoked. Check the Authorization header."}{ "error": "insufficient_credits", "message": "Your balance is exhausted. Top up your credits to continue."}{ "error": "forbidden", "message": "The acting account is not authorized for this write action, or has no logged-in session."}{ "error": "not_found", "message": "The resource does not exist, for example a deleted tweet or a private account."}{ "error": "rate_limited", "message": "Too many requests. Back off and retry with exponential backoff."}{ "error": "server_error", "message": "Something failed on our side. Retry with backoff; if it persists, contact support."}Pricing
| Unit | Price |
|---|---|
| Per call | $0.0008 |
| Per 1,000 calls | $0.80 |
Writes are billed at $0.0008 per call, the same as a standard read. A follow that fails before reaching X is not billed.
When to use
Use it to follow accounts programmatically as your account, for example following back new verified followers.
Related endpoints
- Unfollow User: Unfollow a user on behalf of an authenticated account.
- User Followers: Page through the accounts that follow a user.
- User Following: Page through the accounts a user follows.
FAQ
Does Follow User need a session?
Yes. A follow is added to your own X account's graph, so you must register an X session first or the call returns session_required.
What identifier does it take?
The target account's numeric user_id as a query parameter. Resolve a handle to its ID first with User Info by Username if needed.
How do I unfollow?
Call Unfollow User (user/unfollow) with the same user_id to remove the follow from your account.
Remove Bookmark POST
Remove a previously saved bookmark as the authenticated account. Requires a logged-in session. Billed at $0.0008 per call, the same as a standard read. Cost: $0.0008 per call.
Unfollow User POST
Unfollow a user as the authenticated account. Requires a logged-in session for the acting account. Billed at $0.0008 per call, the same as a standard read. Cost: $0.0008 per call.