v1

latestOpenAPI 3.0.0Twitter Developer Agreement and Policy2026-07-1480235216.3 KB
Users

Block User by User ID

Causes the User (in the path) to block the target User. The User (in the path) must match the User context authorizing the request

post/2/users/{id}/blocking

Path parameters

idstring required

Unique identifier of this User. The value must be the same as the authenticated user.

Example:2244994945

The ID of the authenticated source User that is requesting to block the target User.

Request body

target_user_idstring required

Unique identifier of this User. This is returned as a string in order to avoid complications with languages and tools that cannot handle large integers.

Example request

{
  "target_user_id": "2244994945"
}

Response

The request has succeeded.