Keys
Keys are made on a team's API keys tab. Each key has permissions:
| Permission | Lets the key |
|---|---|
| Read | List files and read their details |
| Write | Upload files and change them |
| Delete | Move files to the bin |
| Send logs | Send logs to fxvault Logs |
| Read logs | Search and read logs |
Create one key per script or server, so you can revoke just that one later. A key is shown once, when it is created; the panel stores only a hash of it. The table shows when each key was last used, and warns if a key was ever seen in a URL.
Send the key in the Authorization header. Never put it in a link or in anything
players' games receive: anyone who has it can use it. Revoking a key stops it
within a minute; files it uploaded stay.
S3 keys are separate and live in their own section of the same tab. See S3 access.
Uploads from players
A player's game should never hold your key. Instead, your server asks for a one-time upload link with the key, and hands the link to the player:
POST https://api.fxvault.link/v1/uploads
Authorization: YOUR_API_KEY
Content-Type: application/json
{ "kinds": ["image"], "expiresIn": 300, "path": "phone", "metadata": { "player": "license:..." } }The answer holds the link and when it expires (at most 15 minutes). The player's
game posts the file to the link as a form field named file. Each link takes one
file, and the metadata your server signed into it cannot be changed by the player.
Uploading from a server
POST https://api.fxvault.link/v1/files
Authorization: YOUR_API_KEY
Content-Type: multipart/form-data
file=<the file> path=cams visibility=public|private metadata={"server":"main"}The answer is the file, with its permanent address. Only images (PNG, JPEG, WebP,
GIF, AVIF), video (MP4, WebM, MOV) and audio (MP3, OGG, WAV, WebM) are accepted,
checked from the bytes, not the name. Files larger than 50 MB go up in parts
through /v1/multipart.
Other routes
| Route | What it does |
|---|---|
GET /v1/files | Lists files, newest first, by folder, type or date |
GET /v1/files/<id> | One file's details |
PATCH /v1/files/<id> | Rename it, move it to another folder, or change its visibility |
DELETE /v1/files/<id> | Moves it to the bin |
POST /v1/files/<id>/restore | Brings it back from the bin |
POST /v1/files/<id>/sign?ttl=3600 | A link to a private file, valid for ttl seconds (60 to 30 days) |
GET /v1/usage | Storage and this month's delivery against the plan |
Fivemanage's routes
api.fxvault.link also answers the routes scripts use with Fivemanage, with your
key in the same Authorization header: /api/v3/file, /api/v3/file/presigned-url,
/api/v2/presigned-url, and the older /api/image, /api/video, /api/audio and
/v1/media/... routes. A script with a Fivemanage address setting works by
swapping the address. Its log routes (/api/v3/logs, /api/logs/batch and /api/logs) store logs in fxvault Logs; see Send logs from Fivemanage scripts. They need a key with Send logs.