Extracting DM's from user status timeline


#1

Is it possible to differentiate Direct Messages from other statuses (e.g. Tweets) in a user status timline? I cannot see an indicator in the DM dictionary that would let me test whther it is a DM or not…

Chris


#2

Direct messages have recipient and sender keys, neither of which tweets have.

https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/get-messages


#3

In addition to @abraham’s comment above, you will never find Direct Messages in a user timeline, as the timeline is strictly for Tweets. Direct Messages exist in a separate inbox and are accessed via different API methods to Tweets and timelines. Tweets are under /statuses/ and Direct Messages are at /direct_messages/ in the API endpoint hierarchies.


#4

Many thanks for the clarification