Follow, search, and get users
API Reference contents
GET followers/ids
GET followers/list
GET friends/ids
GET friends/list
GET friendships/incoming
GET friendships/lookup
GET friendships/no_retweets/ids
GET friendships/outgoing
GET friendships/show
GET users/lookup
GET users/search
GET users/show
GET users/suggestions
GET users/suggestions/:slug
GET users/suggestions/:slug/members
POST friendships/create
POST friendships/destroy
POST friendships/update
POST friendships/update¶
Enable or disable Retweets and device notifications from the specified user.
Resource URL¶
https://api.twitter.com/1.1/friendships/update.json
Resource Information¶
Response formats | JSON |
Requires authentication? | Yes (user context only) |
Rate limited? | Yes |
Parameters¶
Name | Required | Description | Default Value | Example |
screen_name | optional | The screen name of the user being followed. | twitterdev | |
user_id | optional | The ID of the user being followed. | 12345 | |
device | optional | Enable/disable device notifications from the target user. | true | |
retweets | optional | Enable/disable Retweets from the target user. | false |
Example Request¶
POST https://api.twitter.com/1.1/friendships/update.json?user_id=2244994945&device=true
Example Response¶
{
"relationship": {
"target": {
"id_str": "2244994945",
"id": 2244994945,
"followed_by": true,
"screen_name": "twitterdev",
"following": true
},
"source": {
"can_dm": true,
"blocking": false,
"id_str": "819797",
"all_replies": false,
"want_retweets": true,
"id": 819797,
"marked_spam": false,
"followed_by": true,
"notifications_enabled": true,
"screen_name": "episod",
"following": true
}
}
}