Skip to main content
Use this for each image the person gives you to post (a photo, a slide of a carousel): .jpg, .png or .webp, up to 20 MB. JPEG goes everywhere; TikTok takes JPEG or WebP, Instagram JPEG or PNG. Ask nothing first: the file’s extension gives content_type, wc -c &lt; FILE in your shell gives size_bytes (exact: the upload is signed for it). Returns upload_command, one shell line, curl -fsS -T “FILE” ”$(curl -fsS ‘<upload_link>’)”: run it with FILE replaced by the path to the image (keep the quotes), then call finish_image_upload. Then prepare_photo_post with every upload_id, in order. The link in it works for 2 hours. Not for a video: start_upload.

Inputs

A refusal is a result with isError: true and structuredContent.error = {code, message, next}: see Limits and errors.