twitter engagement
Follow a user
Follow a user on X/Twitter. Requires the follows.write OAuth scope. For protected accounts, a follow request is sent instead (pending_follow will be true).
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
accountIdstring
The social account ID
targetUserIdstring
The Twitter ID of the user to follow
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": "success",
"targetUserId": "string",
"following": true,
"pending_follow": true,
"platform": "twitter"
}Empty
{
"error": "Unauthorized"
}Empty