Follow User
Causes the user(in the path) to follow, or “request to follow” for protected users, the target user. The user(in the path) must match the user context authorizing the request
POST
/2/users/{id}/following
curl \
-X POST https://api.twitter.com/2/users/2244994945/following \
-H "Authorization: Oauth $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"target_user_id":"string"}'
Request example
{
"target_user_id": "string"
}
Request examples
{
"target_user_id": "string"
}
Response examples (200)
{
"data": {
"following": true,
"pending_follow": true
},
"errors": [
{
"type": "string",
"title": "string",
"detail": "string",
"status": 42
}
]
}
Response examples (200)
{
"data": {
"following": true,
"pending_follow": true
},
"errors": [
{
"type": "string",
"title": "string",
"detail": "string",
"status": 42
}
]
}
Response examples (default)
{
"code": 42,
"message": "string"
}
Response examples (default)
{
"code": 42,
"message": "string"
}