Retrieving older than 30 days Direct Messages (direct_messages/events/list)

direct-messages

#1

Hello Twitter Community,

Referring to the new endpoint for retrieving direct messages GET direct_messages/events/list, which going to be the only way of retreiving past direct messages on June 19. 2018 after deprecating totally GET direct_messages.

The documentation describes the endpoint as it’s…

Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.

Is it possible in anyway to retrieve older than 30 days direct messages?

Is this the responsibility of this endpoint only, there is no other endpoint that can make this possible?

The Migration Guide doesn’t mention this possibility. The Webhook live retrieving isn’t relevant since we are looking for the older DMs not the recent ones only. Also the cursor pagination isn’t relevant, since the last page can only be within the past 30 days, it wouldn’t return the next_cursor in the last page.


#2

No, there’s no way to get messages older than the 30 day window. Note that the previous version of the Direct Message API did not even enable this volume of history, as it only allowed a certain number of Direct Messages to be retrieved, not a dated window. Unfortunately there are no plans to extend this window at the moment.


#3

Seriously, this looks really bad to limit things like this. I was able to get old DMs with the deprecated API, now I can’t.

BTW, the only possible solution will be to subscribe to the premium or entreprise plan and to use webhooks with the account activity API (https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference), and store these DMs by ourself on our side :frowning:


#4

I’m slightly confused, because in the past, the “age” of the Direct Messages you would be able to retrieve was dependent on volume. So if you were dealing with an account with a small number of Direct Message conversations then yes in principle you’d be able to get messages from two months ago, but the new API effectively says no matter how many conversations you have and no matter the volumes you can always go back 30 days. To me, this seems like an enhancement. Apologies if this is not your experience. What am I missing here?


#5

Yes, this is the issue: age was dependent on volume. For account with a small number of DMs, we were able to get messages from many months ago which in some use cases is good isn’t it? Having this new limit to 30 days, even without having to care about the number of messages does not fit all the use cases.

I understand that business is business but come on, breaking things like this is not nice. Anyway we can bypass this limitation:

  1. by paying for premium plan and building things on our side from account activity or streams…
  2. by polling the new API, and storing things on our side

#6

OK thank you for helping me to understand. In cases like these it is difficult to solve for all of the use cases. I believe we genuinely feel we have expanded access for (example) social media listening / service apps where it may depend on or anticipate volume over date access, but I acknowledge that this may not work for your specific case. Apologies.

I’d also point out that the REST endpoints are unlikely to provide the most responsive access to Direct Messages. The new endpoints were designed in sync with the Account Activity API for more real-time access to new conversations.