Returns the 20 most recent direct messages sent to 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 incoming 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
Parameters
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
Returns results with an ID less than (that is, older than) or equal to the specified ID.
Example Values: 54321
Specifies the number of direct messages to try and retrieve, up to a maximum of 200. The value of count is best thought of as a limit to the number of Tweets to return because suspended or deleted content is removed after the count has been applied.
Example Values: 5
Specifies the page of results to retrieve.
Example Values: 3
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
When set to either true, t or 1 statuses will not be included in the returned user objects.
Example Request
GET | |
[
{
"created_at": "Tue Jun 22 17:48:26 +0000 2010",
"sender_screen_name": "themattharris",
"sender": {
"name": "Matt Harris",
"profile_sidebar_border_color": "C0DEED",
"profile_background_tile": false,
"profile_sidebar_fill_color": "DDEEF6",
"location": "San Francisco",
"profile_image_url": "http://a1.twimg.com/profile_images/554181350/matt_normal.jpg",
"created_at": "Sat Feb 17 20:49:54 +0000 2007",
"profile_link_color": "0084B4",
"favourites_count": 95,
"url": "http://themattharris.com",
"contributors_enabled": false,
"utc_offset": -28800,
"id": 777925,
"profile_use_background_image": true,
"profile_text_color": "333333",
"protected": false,
"followers_count": 1026,
"lang": "en",
"verified": false,
"profile_background_color": "C0DEED",
"geo_enabled": true,
"notifications": false,
"description": "Developer Advocate at Twitter. Also a hacker and British expat who is married to @cindyli and lives in San Francisco.",
"time_zone": "Tijuana",
"friends_count": 294,
"statuses_count": 2923,
"profile_background_image_url": "http://s.twimg.com/a/1276711174/images/themes/theme1/bg.png",
"screen_name": "themattharris",
"following": true
},
"text": "sure thing. Meet you at the mall around 7?",
"recipient_screen_name": "mattytest",
"id": 1270520569,
"recipient": {
"name": "mattytest",
"profile_sidebar_border_color": "C0DEED",
"profile_background_tile": false,
"profile_sidebar_fill_color": "DDEEF6",
"location": "",
"profile_image_url": "http://a1.twimg.com/profile_images/644612310/matt_bright_normal.png",
"created_at": "Thu Jan 22 16:27:50 +0000 2009",
"profile_link_color": "0084B4",
"favourites_count": 0,
"url": null,
"contributors_enabled": false,
"utc_offset": -28800,
"id": 19345946,
"profile_use_background_image": false,
"profile_text_color": "333333",
"protected": true,
"followers_count": 3,
"lang": "en",
"verified": false,
"profile_background_color": "C0DEED",
"geo_enabled": true,
"notifications": false,
"description": "",
"time_zone": "Tijuana",
"friends_count": 2,
"statuses_count": 9,
"profile_background_image_url": "http://s.twimg.com/a/1277162817/images/themes/theme1/bg.png",
"screen_name": "mattytest",
"following": false
},
"recipient_id": 19345946,
"sender_id": 777925
}
]