Twitter Engagement
Follow a user
Follow a user on X. Requires the follows.write OAuth scope. For protected accounts, a follow request is sent instead (pending_follow will be true).
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.twitterengagement.followUser({ body: { accountId: 'account_abc123', targetUserId: 'targetuser_abc123', },});console.log(data);{ "status": "string", "targetUserId": "string", "following": true, "pending_follow": true, "platform": "string"}Was this page helpful?