Upload media from a URL (third party web storage)

media-upload
api

#1

My media files (video and images) are uploaded on some third party storage on the web ago (for example CDNs, YouTube, Google Drive and…).

Now I want to upload them on the twitter by API.
I won’t to use the media links in body of my tweets, instead I want upload them as media tweets (each one with its caption).

Also as I said:

I want to prevent this process that » I download the medias from the web storage on my computer and then upload them on the twitter!

It has some negative side effects for my project (increasing traffics on my computer and slow-downing it, increasing the upload process time of each media and more costs).

So I need a method to upload the medias from a web link (for example a link from Amazon CDN) instead of passing the bytes of the media to the Twitter directly from my computer.

Some Social Medias have this ability in their API, often they return the upload result to a Webhook so we can verify that the uploaded media (by media_id) has been uploaded successfully.

Questions:

  • I could not find any useful method about this ability in the Twitter API.
  • Is there a way that I don’t know it?
  • If there is not a way yet, is it possible to provide this feature in your API? When?

Thank you


#2

There is no capability to do this - you’ll need to upload the data directly to Twitter via the API, and the API only accepts the file data itself, not a URL reference. There are no plans to add upload via media URL reference at present.


#3

Thank you @andypiper for your fast reply.
If it is possible please think about this feature because it help the developers and third party system (the systems behind the Apps) a lot to make their media communication with Twitter easier, faster and with lower costs.


#4

yes but there should be plans for this important feature. Last time I argued that email access should be added as an option and they removed me from Twitter Developer forums, I just did ask why Twitter asks for email if it’s against Twitter’s philosophy for their pseudonyms to be attached to real emails…

years later probably with TWTR worth 1/4 the price and we have email access option enabled (wink wink) => hear us and prioritise this important feature.


#5

You can follow the developer platform roadmap here. There are currently no plans to add this, the platform is oriented towards data-centric features as described in our April announcement.