Users
Check Relationship
Check if one user follows another
GET /twitter/user/check_follow_relationship
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source_user_name | string | Yes | Source user screen name (without @) |
target_user_name | string | Yes | Target user screen name (without @) |
Notes
- Check if the source user is following/followed by the target user.
- Returns relationship details including blocking and muting status.
Response
{
"status": "success",
"msg": "success",
"data": {
"sourceUserName": "druv_kotwani",
"targetUserName": "elonmusk",
"sourceFollowsTarget": true,
"targetFollowsSource": false,
"canDm": false,
"blocking": false,
"blockedBy": false,
"muting": false
}
}Response Fields
| Field | Type | Description |
|---|---|---|
sourceUserName | string | @handle of source user |
targetUserName | string | @handle of target user |
sourceFollowsTarget | boolean | True if source follows target |
targetFollowsSource | boolean | True if target follows source |
canDm | boolean | True if source can DM target |
blocking | boolean | True if source is blocking target |
blockedBy | boolean | True if source is blocked by target |
muting | boolean | True if source is muting target |
Example
curl -H "Authorization: Bearer API_KEY" "https://api.getxapi.com/twitter/user/check_follow_relationship?source_user_name=druv_kotwani&target_user_name=elonmusk"