Actions2
Upload Media
AI-generatedSummary
Upload a media file to Twitter/X via OAuth 1.0a and return the media identifier and metadata.
Inputs
- binaryPropertyName (required) — Name of the binary property which contains the file to upload
- mediaType — The MIME type of the media being uploaded
- customMediaType — Custom MIME type (e.g., audio/mpeg). Shown when mediaType is set to custom.
Output shape
json
Returned per input item. Contains media_id, media_id_string, size, expires_after_secs, and media_type from the Twitter upload finalization response.
Examples
Example 1: Upload an image from a binary property
binaryPropertyName: data; mediaType: image/png; credentials: twitterMediaUploadApi; input item with binary data in the 'data' property