GET direct_messages/sent

Returns the 20 most recent direct messages sent by the authenticating user. Includes 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.1/direct_messages/sent.json

Resource Information

Response formats JSON
Requires authentication? Yes (user context only)
Rate limited? Yes
Requests / 15-min window (user auth) 15

Parameters

Name Required Description Default Value Example
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.   12345
max_id optional Returns results with an ID less than (that is, older than) or equal to the specified ID.   54321
count optional Specifies the number of records to retrieve. Must be less than or equal to 200.   5
page optional Specifies the page of results to retrieve.   3
include_entities optional The entities node will not be included when set to false .   false

Example Request

GET https://api.twitter.com/1.1/direct_messages/sent.json?count=2&since_id=240247560269340670

Example Response


[
    {
        "created_at": "Tue Aug 28 00:40:56 +0000 2012",
        "entities": {
            "hashtags": [],
            "urls": [],
            "user_mentions": []
        },
        "id": 240247560269340673,
        "id_str": "240247560269340673",
        "recipient": {
            "contributors_enabled": true,
            "created_at": "Sat May 09 17:58:22 +0000 2009",
            "default_profile": false,
            "default_profile_image": false,
            "description": "I taught your phone that thing you like.  The Mobile Partner Engineer @Twitter. ",
            "favourites_count": 584,
            "follow_request_sent": false,
            "followers_count": 10622,
            "following": true,
            "friends_count": 1181,
            "geo_enabled": true,
            "id": 38895958,
            "id_str": "38895958",
            "is_translator": false,
            "lang": "en",
            "listed_count": 190,
            "location": "San Francisco",
            "name": "Sean Cook",
            "notifications": false,
            "profile_background_color": "1A1B1F",
            "profile_background_image_url": "http://a0.twimg.com/profile_background_images/495742332/purty_wood.png",
            "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/495742332/purty_wood.png",
            "profile_background_tile": true,
            "profile_image_url": "http://a0.twimg.com/profile_images/1751506047/dead_sexy_normal.JPG",
            "profile_image_url_https": "https://si0.twimg.com/profile_images/1751506047/dead_sexy_normal.JPG",
            "profile_link_color": "2FC2EF",
            "profile_sidebar_border_color": "181A1E",
            "profile_sidebar_fill_color": "252429",
            "profile_text_color": "666666",
            "profile_use_background_image": true,
            "protected": false,
            "screen_name": "theSeanCook",
            "show_all_inline_media": true,
            "statuses_count": 2608,
            "time_zone": "Pacific Time (US & Canada)",
            "url": null,
            "utc_offset": -28800,
            "verified": false
        },
        "recipient_id": 38895958,
        "recipient_screen_name": "theSeanCook",
        "sender": {
            "contributors_enabled": false,
            "created_at": "Thu Aug 23 19:45:07 +0000 2012",
            "default_profile": false,
            "default_profile_image": false,
            "description": "Keep calm and test",
            "favourites_count": 0,
            "follow_request_sent": false,
            "followers_count": 0,
            "following": false,
            "friends_count": 11,
            "geo_enabled": true,
            "id": 776627022,
            "id_str": "776627022",
            "is_translator": false,
            "lang": "en",
            "listed_count": 0,
            "location": "San Francisco, CA",
            "name": "Mick Jagger",
            "notifications": false,
            "profile_background_color": "000000",
            "profile_background_image_url": "http://a0.twimg.com/profile_background_images/644522235/cdjlccey99gy36j3em67.jpeg",
            "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/644522235/cdjlccey99gy36j3em67.jpeg",
            "profile_background_tile": true,
            "profile_image_url": "http://a0.twimg.com/profile_images/2550256790/hv5rtkvistn50nvcuydl_normal.jpeg",
            "profile_image_url_https": "https://si0.twimg.com/profile_images/2550256790/hv5rtkvistn50nvcuydl_normal.jpeg",
            "profile_link_color": "000000",
            "profile_sidebar_border_color": "000000",
            "profile_sidebar_fill_color": "000000",
            "profile_text_color": "000000",
            "profile_use_background_image": false,
            "protected": false,
            "screen_name": "s0c1alm3dia",
            "show_all_inline_media": false,
            "statuses_count": 0,
            "time_zone": "Pacific Time (US & Canada)",
            "url": "http://cnn.com",
            "utc_offset": -28800,
            "verified": false
        },
        "sender_id": 776627022,
        "sender_screen_name": "s0c1alm3dia",
        "text": "Meet me behind the cafeteria after school."
    }
]