Multiple Media Entities in Tweets for the REST API


It says May 28, but help/configuration still returns this:

array (
‘characters_reserved_per_media’ => 23,
‘max_media_per_upload’ => 1,

‘photo_size_limit’ => 3145728,

‘short_url_length’ => 22,
‘short_url_length_https’ => 23,

So does the example at

I also wonder whether statuses/update_with_media can fully replace statuses/update. In other words, with no “media[]”, but everything else exactly the same.

When/if you support multiple files, can each image (and video?) be photo_size_limit large, or are we talking aggregate size of all files per update?

A list of what media types can be uploaded (preferably as MIME type), would be a nice-to-have in help/configuration.



I noticed that a picture link is at least 26 characters long (http(s):// is not shown, so that maybe adds more), while help/configuration returns 23. Is the link actually shorter, but shown in full?

Example (an actual update): “This should be visible at

When multiple files are supported, will each URL take up space in the tweet or will it point to a page with all the media (how I solved it in Twitizer)?



I didn’t even try that, as I assumed I could send only one as help/configuration says so :).

Are more than pictures supported now (like videos and audio)? Any way to determine what media formats are supported?

Has also the picture size limit been changed from 3 MB?



Any support of extended_entities over stream API?


It does not appear to be there yet.


Were you able to figure this out? I can’t seem to get it to work either


This should be available in the Streaming API after August 25th.


I’m trying to send a POST Request with nodejs but my request fails. Does anybody have a hint?
Tried the following:

Content-Type: multipart/form-data; boundary=---------------------------48870936082676053
Content-Disposition: form-data; name=“media”; filename="image_5.jpg"
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

base64 encoded image content

But the API responds with “Unknown Twitter API Error” (Status Code 400) “not recognized.”

When using media_data parameter as described in the article (cite: “Note that if you’re uploading a base64-encoded, the param name for this endpoint will be media_data rather than media, which is used for raw images.”)

Content-Type: multipart/form-data; boundary=---------------------------5757786715403199
Content-Disposition: form-data; name=“media_data”; filename="image_5.jpg"
Content-Type: application/octet-stream
Content-Transfer-Encoding: base64

base64 encoded image

The API responds with “Unknown Twitter API Error” (Status Code 409) “media param has zero bytes”


I use “media[]”, not saying that’s the reason for your issues.

You of course need to authenticate with OAuth, but I assume you do that.


Thank you @abiro. Yes I’m using OAuth and had a try with “media[]” but that didn’t work either. I suppose I have to look for an error in my code…

By the way do you POST base64 encoded images?


I use Zend_Oauth_Token_Access and Zend_Http_Client. From what I can see from the latter, it’s in binary as no conversion is made, only the general “MIME magic” is performed.

My code is no doubt working and in a stable way. I filter out too large images (3 MB), so such are not even attempted to send. I also only upload one image, even though supposedly the API supports more. Users have uploaded much larger animated GIFs than 3 MB, but I store all content in my service and link back.


I believe extended entities should now be available in the Streaming API, see


I’ve got this working, but why couldn’t this be done with statuses/update_with_media? The media parameter is even an array, and sticking with would make it easier as well.


I can’t seem to get extended_entities from Search API, is it supported yet? Whereas I’ve no problem getting it from user timeline so I’m guessing access token is not the issue here.

Someone from Twitter please let us know. Thanks.


As et_smpi said, I can also report that I can’t access extended_entities via the Search API for a tweet with multiple photos.


Why can’t I use extend_entities in search API still now?



Hey guys, I am basically new to scraping for Twitter Data, and I wanted to know, how do I tell the difference between the “Media entitiy” and the “Extended Entities”. For example, if somebody posts 2 photos with a Tweet, would photo 1 info be in the media entity and the photo 2 with the extended entity? What about mp4, etc. ? Please let me know if I seem to be asking a confusing question.


The first media item - specifically an image - would be in the media entity section. Everything else - more images, animated gifs, or videos - would be in the extended entities.


Dear Mr. Piper, You’re a champ!


I found that in some tweets there is missing media entities. For example:
{ "created_at": "Tue May 24 23:11:30 +0000 2016", "id": 735246876396511200, "id_str": "735246876396511232", "text": "A diferença entre assassinos e inocentes é que uns usam máscaras. 31 de Maio, 2a temporada #ScreamNaNetflix\n", "truncated": false, "entities": { "hashtags": [], "symbols": [], "user_mentions": [], "urls": [ { "url": "", "expanded_url": "", "display_url": "…", "indices": [] } ] }, "source": "<a href="" rel="nofollow">Twitter Web Client</a>", "in_reply_to_status_id": null, "in_reply_to_status_id_str": null, "in_reply_to_user_id": null, "in_reply_to_user_id_str": null, "in_reply_to_screen_name": null, "user": {}, "geo": null, "coordinates": null, "place": null, "contributors": null, "is_quote_status": false, "retweet_count": 804, "favorite_count": 1102, "favorited": false, "retweeted": false, "possibly_sensitive": false, "possibly_sensitive_appealable": false, "lang": "pt" }
I read comments about same problem but they were one year old and closed with statment they are fixed.
So is it still a bug or am I doing someting wrong?