- Faster loading: Load saved files and thumbnails for galleries, inboxes, and content planners.
- Lookup by ID: Find saved media even when it is not attached to a post, message, or story. OnlyFans does not offer a general lookup by media ID for these unattached files.
- Less URL handling: Show saved media without keeping track of expiring OnlyFans URLs or finding the post, message, or story that contains it.
Before you start
Enable Vault+ for the environment in your integration’s dashboard settings. Select a linked account the user shared with your app. Requestvault:write to save or delete copies and vault:read to read them. These scopes are the permissions your app needs.
Install the TypeScript SDK version 4. Create a client and enable Vault+ for the account through its settings:
vault_plus_disabled. If the account setting is off, add and sync return linked_account_vault_plus_disabled.
Choose add or sync
Use add to save missing files and keep all existing copies. Use sync to make your saved copies match later changes to a Vault list.Save files from a Vault list
Use a list ID from the account’s Vault lists. Replace101 with your list ID:
Keep a list in sync
To update saved copies when a list changes, call:adoptedItems counts files you already saved that this list’s sync now tracks for the first time. Use the sync reference for the full response.
Read saved media
client.vaultPlus.media.get({ mediaId: 789 }). You do not need a post, message, or story ID. Each item can have several versions, such as full, thumb, and 720. Use thumb to show a thumbnail in your platform. To read several items, call client.vaultPlus.media.batch({ body: { mediaIds: [789, 790] } }). The response leaves out IDs it cannot find.
The query reference lists the filters for status, type, date, duration, sort order, and result pages. Vault+ type filters use image, video, and audio.
/status reports status for the selected account. /stats reports all accounts shared with your integration in the selected environment. Keep these totals separate in reports.
Delete retained media
Callclient.vaultPlus.media.delete({ mediaId: 789 }) to delete one saved item. To delete all saved media for the selected account, call client.vaultPlus.media.deleteAll(). Both calls require vault:write.
Deleting retained media does not delete the original OnlyFans post or message. To delete the original content, use the Access request for that post or message.
Next, display media or read the Vault+ query reference.