Can't attach a GIF to a DM


Dear Twitter Community:

We can send images and videos with media category dm_image and dm_video, however, every time we try to send a GIF with the media category dm_gif we get this error:
Error: HTTP Error 500: Internal Server Error, API message: {"errors":[{"message":"Internal error","code":131}]}

Here is one media_id we tried to send: 893412318830370816

There is no enough information in the response to know what’s wrong, we tried with different gifs from but all of them fail when sending the DM.

Please note that the upload works well, this is a problem when using the endpoint


Can you share the JSON body in the request to direct_messages/events/new?

I was just able to attach a gif from giphy to a DM successfully.


Hey Jonathan,

We fixed this problem by switching to the chunk based upload.

Thank you,