wc -c < 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.