v1
latestOpenAPI 3.0.12026-07-17110111.4 KBUploads media to X (formerly Twitter) for attaching to tweets.
This function uploads a media file to X, which can then be attached to a tweet. It takes a Buffer object containing the media file and its MIME type as input. The function returns a promise that resolves to a MediaUploadResponse object containing details about the uploaded media.
post/upload
Request body
Response
Successful media upload