Hi,
I am trying to attach image to direct messages. Documentation link: https://dev.twitter.com/rest/direct-messages/attaching-media
As described in documentation, I am using media upload REST API to upload the image. Ref: https://dev.twitter.com/rest/reference/post/media/upload-init
After getting mediaID, I am using this REST API (https://dev.twitter.com/rest/reference/post/direct_messages/events/new) to send direct message with media attachment.
However I am getting this error message:
{
"errors": [
{
"code": 151,
"message": "There was an error sending your message: Bad Media, unable to process: None."
}
]
}
The upload REST API worked fine for the image. Can someone please point me towards the right direction.