Before you start
Ask the user to authorize your app withstories:write, which lets your app publish stories. Use the returned token and select a linked account the user shared. For new uploads, also request vault:write. The API base URL is https://api.ofauth.com.
Post an existing Vault image
Install the TypeScript SDK version 4. Replace789 with the numeric ID of an image from Vault media:
id. For example, these fields identify the story and its owner:
Upload a new image and create the story
Follow Upload media with the image’s original filename and file type. That guide uploads every part and finalizes the upload. ItsmediaItem value is either an existing numeric Vault ID or a completed upload reference. Pass that value to story creation:
Add release forms
The optionalreleaseForms object accepts numeric user IDs in users, partners, and guests arrays. Include releaseForms with mediaItems when needed.
Image requirements
Use a numeric Vault image ID, a numeric string, or a finalizedupload: reference. Story creation accepts one image and rejects GIFs and videos. Crop, rotate, or arrange the image before uploading it. The request accepts mediaItems and optional releaseForms. It does not accept canvas dimensions, questions, or image editor settings.