GET direct_messages/sent

Updated on Sat, 2012-08-25 08:38

Returns the 20 most recent direct messages sent by the authenticating user. The XML and JSON versions include detailed information about the sender and recipient user. You can request up to 200 direct messages per call, up to a maximum of 800 outgoing DMs.

Important: This method requires an access token with RWD (read, write & direct message) permissions. Consult The Application Permission Model for more information.

Resource URL

https://api.twitter.com/1/direct_messages/sent.format

Parameters

since_id optional

Returns results with an ID greater than (that is, more recent than) the specified ID. There are limits to the number of Tweets which can be accessed through the API. If the limit of Tweets has occured since the since_id, the since_id will be forced to the oldest ID available.

Example Values: 12345

max_id optional

Returns results with an ID less than (that is, older than) or equal to the specified ID.

Example Values: 54321

count optional

Specifies the number of records to retrieve. Must be less than or equal to 200.

Example Values: 5

page optional

Specifies the page of results to retrieve.

Example Values: 3

include_entities optional

When set to either true, t or 1, each tweet will include a node called "entities,". This node offers a variety of metadata about the tweet in a discreet structure, including: user_mentions, urls, and hashtags. While entities are opt-in on timelines at present, they will be made a default component of output in the future. See Tweet Entities for more detail on entities.

Example Values: true

Example Request

GET

https://api.twitter.com/1/direct_messages/sent.json?since_id=1270516770

  1. [
  2.   {
  3.     "created_at": "Tue Jun 22 17:47:27 +0000 2010",
  4.     "sender_screen_name": "mattytest",
  5.     "sender": {
  6.       "name": "mattytest",
  7.       "profile_sidebar_border_color": "C0DEED",
  8.       "profile_background_tile": false,
  9.       "profile_sidebar_fill_color": "DDEEF6",
  10.       "location": "",
  11.       "profile_image_url": "http://a1.twimg.com/profile_images/644612310/matt_bright_normal.png",
  12.       "created_at": "Thu Jan 22 16:27:50 +0000 2009",
  13.       "profile_link_color": "0084B4",
  14.       "favourites_count": 0,
  15.       "url": null,
  16.       "contributors_enabled": false,
  17.       "utc_offset": -28800,
  18.       "id": 19345946,
  19.       "profile_use_background_image": false,
  20.       "profile_text_color": "333333",
  21.       "protected": true,
  22.       "followers_count": 3,
  23.       "lang": "en",
  24.       "verified": false,
  25.       "profile_background_color": "C0DEED",
  26.       "geo_enabled": true,
  27.       "notifications": false,
  28.       "description": "",
  29.       "time_zone": "Tijuana",
  30.       "friends_count": 2,
  31.       "statuses_count": 9,
  32.       "profile_background_image_url": "http://s.twimg.com/a/1277162817/images/themes/theme1/bg.png",
  33.       "screen_name": "mattytest",
  34.       "following": false
  35.     },
  36.     "text": "Hey, still ok for dinner tonight?",
  37.     "recipient_screen_name": "themattharris",
  38.     "id": 1270516771,
  39.     "recipient": {
  40.       "name": "Matt Harris",
  41.       "profile_sidebar_border_color": "C0DEED",
  42.       "profile_background_tile": false,
  43.       "profile_sidebar_fill_color": "DDEEF6",
  44.       "location": "San Francisco",
  45.       "profile_image_url": "http://a1.twimg.com/profile_images/554181350/matt_normal.jpg",
  46.       "created_at": "Sat Feb 17 20:49:54 +0000 2007",
  47.       "profile_link_color": "0084B4",
  48.       "favourites_count": 95,
  49.       "url": "http://themattharris.com",
  50.       "contributors_enabled": false,
  51.       "utc_offset": -28800,
  52.       "id": 777925,
  53.       "profile_use_background_image": true,
  54.       "profile_text_color": "333333",
  55.       "protected": false,
  56.       "followers_count": 1025,
  57.       "lang": "en",
  58.       "verified": false,
  59.       "profile_background_color": "C0DEED",
  60.       "geo_enabled": true,
  61.       "notifications": false,
  62.       "description": "Developer Advocate at Twitter. Also a hacker and British expat who is married to @cindyli and lives in San Francisco.",
  63.       "time_zone": "Tijuana",
  64.       "friends_count": 294,
  65.       "statuses_count": 2923,
  66.       "profile_background_image_url": "http://s.twimg.com/a/1276711174/images/themes/theme1/bg.png",
  67.       "screen_name": "themattharris",
  68.       "following": true
  69.     },
  70.     "recipient_id": 777925,
  71.     "sender_id": 19345946
  72.   }
  73. ]