POST to media/upload return media Id but using that media Id in statuses/update return invalid




I receive this error when trying to make a tweet with image.

Response Status: '400 Bad Request' Response Code: 400 Response Body: {"errors":[{"code":44,"message":"media parameter is invalid."}]}
I’ve tried different images. For images larger than 3MB, it does return media Id. However, when trying to use that media Id, it says “media parameter is invalid”. Everything works fine with images less than 3MB. The image format are jpg and png

Shouldn’t the limit be 5MB according to the documentation?


I’m having the same issue.

I am able to upload an image and get the media ID back, but when I try to do a status update with any media ID I get the above error.

I’d love to know what ‘media’ parameter this is talking about, I have not specified a media parameter.


I solved my problem by using the media_id_string rather than the media_id in the status update.


I’ve tried both media_id and media_id_string but no luck


I’m getting the same error, but with a small mp4 video upload.


Appreciate you guys posting. Just made a small tool to let you test uploading your media files to Twitter. It supports both media upload, as well as using binary and base64 options.

If you want to run it locally, the source available here:

Let me know how your media fares with this upload tool, and if continues to see errors in upload, post your media content and response you get from the tool here.


Do you have library for Go?


Getting the same error when tried to upload image available at the url Can some one please help me in finding out the limitations with tweet creation.


Hi @rchoi thanks for writing this media upload tool! I did try the video we’ve been trying to get to Twitter through it ( and replicated the same “media parameter is invalid” error we’re getting on our side too.

I checked the Video Inspector in QuickTime and all seems within Twitter’s requirements. Any idea what else could be causing this failure? Thanks!

Eric Nograles


can you provide the media so i can test and debug on our side?


twitter updated the doc on the media/upload endpoint here:

And the answer of your question can be explained by this:
The maximum image size for this endpoint(uploading-media) is 5MB. Depending on how the image is used, further limits apply. For example, if the image is attached to a Tweet, the maximum limit in this case is 3MB.


Hello sir, I share the video on twitter and I got the Media Of that but from that media didn’t get the twitter fav and retweet count it showing the
ERROR: No status found with that ID.

but before some days it showing the count of that video ID.

Twitter changes API…?