Removing the 140 character limit from Direct Messages


We’ve done a lot to improve Direct Messages over the past year and have much more exciting work on the horizon. One change coming in (edit: August) that we want to make you aware of now (and first!) is the removal of the 140 character limit in Direct Messages. In order to make this change as seamless as possible for you we’ve included some recommendations below to ensure all your applications and services can handle these longer format messages before we flip the switch.

We recommend taking the following actions in preparation:

  1. Review the new API additions below.
  2. Update your GET requests so you will be able to receive the full length of DM text.
  3. Adjust your app UI to accommodate longer DM text.

We encourage you to test and deploy the above changes in advance, but you won’t be able to send longer DMs until we launch in July. In the coming weeks though, we will update this post to include directions on how to test these changes, as well as a more specific launch date.

You may be wondering what this means for the public side of Twitter. Nothing! Tweets will continue to be the 140 characters they are today.

We’re excited to hear your input. If you have technical questions, feel free to ask in the REST API forum or reach us @TwitterDev. Thanks, and stay tuned for more!

API updates:

    DM read endpoints (GET direct_messages, GET direct_messages/sent and GET direct_messages/show)
    Send “full_text=true” as a query parameter to receive long DM text. If this parameter is not provided, you will get a truncated version of the DM. There will be no structural changes to the response returned by these endpoints.
    DM write endpoint (POST direct_messages/new)
    The “text” parameter will start accepting text longer than 140 characters. The new limit for DMs will be 10k characters.

  • Streaming API
    User Streams (GET user) and Site Streams (GET site) will automatically start receiving DMs that have text longer than 140 characters. Unlike the REST API, no additional parameter is needed. There will be no structural changes to the objects returned by these endpoints.

Update 7/15/2015

Here are a few updates to help you test sending and receiving long DMs in your app:

  • New account that can send and receive long DMs
    The account is @LongDmBot. You must follow this account.
    You can send DMs to this account, and it will reply back with the same text.
    This is the only account you can send messages to that are longer than 140 characters.

  • New help/configuration field
    We’ve added a field called “dm_text_character_limit” to the config object returned by the 1.1/help/configuration endpoint.
    Currently, the value of this field is 140. When we raise the limit, the value of this field will reflect the new limit (10000).

  • New error code returned for message text over the limit
    We return 403 HTTP Status Code with Error Code 354 if the DM text is over the current limit.

Stay tuned here for more updates on when this feature will begin rolling out to users.

Update 7/31/2015

We hope you’re as excited about long DMs as we are! We’re putting the final touches on our apps now, and we’ll start rolling out the change in mid August. Stay tuned for more info!

Removing the 140 character limit from Direct Messages
Regarding increasing the character count of Direct Message from 140 to 10000
Additional config parameter for new DM 140+ feature
Docs Missing New Parameter (direct_messages)
Regarding increasing the character count of Direct Message from 140 to 10000
Is there a way to get full DM text via API?
closed #2

pinned #3

unpinned #4