Access media shared in direct messages

vincentisambart
@vincentisambart Vincent Isambart

Applications with direct message read permissions can retrieve information necessary to securely display images included in Direct Messages using the REST API and OAuth 1.0A. Similarly to tweets with media, direct message images are represented as media entities and image variants are available by appending suffixes to the media URL.

Unlike media shared in Tweets, media shared in direct messages requires authorization to view. This authorization can be presented via an authenticated twitter.com session or by signing a request with the user's access token using OAuth 1.0A.

Note that it's currently not possible to attach media to direct messages with POST direct_messages/new.

30 weeks 1 day ago

Replies

fiza51852756
@fiza51852756 fiza

@vincentisambart what should be use to post server image with tweet ?

24 weeks 6 days ago
stefangaemperle
@stefangaemperle Marlowe

I can send the direct message with image in form data, but the image will not be displayed in the message. Any idea how long it takes to be able to send image with photo in direct message?

21 weeks 6 days ago