POST blocks/create

Updated on Tue, 2014-04-22 07:43

Blocks the specified user from following the authenticating user. In addition the blocked user will not show in the authenticating users mentions or timeline (unless retweeted by another user). If a follow or friend relationship exists it is destroyed.

Resource URL

https://api.twitter.com/1.1/blocks/create.json

Parameters

Either screen_name or user_id must be provided.

screen_name optional

The screen name of the potentially blocked user. Helpful for disambiguating when a valid screen name is also a user ID.

Example Values: noradio

user_id optional

The ID of the potentially blocked user. Helpful for disambiguating when a valid user ID is also a valid screen name.

Example Values: 12345

include_entities optional

The entities node will not be included when set to false.

Example Values: false

skip_status optional

When set to either true, t or 1 statuses will not be included in the returned user objects.

Example Values: true

Extended description

The URL pattern /version/block/create/:screen_name_or_user_id.format is still accepted but not recommended. As a sequence of numbers is a valid screen name we recommend using the screen_name or user_id parameter instead.

Example Request

POST

https://api.twitter.com/1.1/blocks/create.json

POST Data

screen_name=theSeanCook&skip_status=1


  1. {
  2.     "contributors_enabled": true, 
  3.     "created_at": "Sat May 09 17:58:22 +0000 2009", 
  4.     "default_profile": false, 
  5.     "default_profile_image": false, 
  6.     "description": "I taught your phone that thing you like.  The Mobile Partner Engineer @Twitter. ", 
  7.     "entities": {
  8.         "description": {
  9.             "urls": []
  10.         }
  11.     }, 
  12.     "favourites_count": 586, 
  13.     "follow_request_sent": false, 
  14.     "followers_count": 10622, 
  15.     "following": false, 
  16.     "friends_count": 1181, 
  17.     "geo_enabled": true, 
  18.     "id": 38895958, 
  19.     "id_str": "38895958", 
  20.     "is_translator": false, 
  21.     "lang": "en", 
  22.     "listed_count": 190, 
  23.     "location": "San Francisco", 
  24.     "name": "Sean Cook", 
  25.     "notifications": false, 
  26.     "profile_background_color": "1A1B1F", 
  27.     "profile_background_image_url": "http://a0.twimg.com/profile_background_images/495742332/purty_wood.png", 
  28.     "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/495742332/purty_wood.png", 
  29.     "profile_background_tile": true, 
  30.     "profile_image_url": "http://a0.twimg.com/profile_images/1751506047/dead_sexy_normal.JPG", 
  31.     "profile_image_url_https": "https://si0.twimg.com/profile_images/1751506047/dead_sexy_normal.JPG", 
  32.     "profile_link_color": "2FC2EF", 
  33.     "profile_sidebar_border_color": "181A1E", 
  34.     "profile_sidebar_fill_color": "252429", 
  35.     "profile_text_color": "666666", 
  36.     "profile_use_background_image": true, 
  37.     "protected": false, 
  38.     "screen_name": "theSeanCook", 
  39.     "show_all_inline_media": true, 
  40.     "statuses_count": 2609, 
  41.     "time_zone": "Pacific Time (US & Canada)", 
  42.     "url": null, 
  43.     "utc_offset": -28800, 
  44.     "verified": false
  45. }