We are excited to share that developers can now upload media to X using the X API v2!
You can upload images or videos using the POST https://api.x.com/2/media/upload endpoint and attach the media to a Post on X using POST https://api.x.com/2/posts
Developers that have been using our older media upload endpoints i.e. https://upload.twitter.com/1.1/media/upload.json should now start migrating to the new v2 endpoint.
Check out our complete guide on uploading and publishing media to X using the X API v2.
See our developer docs for more information. You can also get started using our Postman collection or sample code from our Github repository.
X Developer Platform team
12 Likes