Developers
Keys and folders
What a key is
One string, atmv1_ followed by 150 characters, made by the vault's owner in Settings -> Services -> New API key. It is shown once.
It is a private key. Whoever holds it can read the folder it was made for, and change it if the key can edit. Keep it in the environment of the process that uses it: never in source code, a repository or a URL.
What a key reaches
- One folder, and everything inside it. The owner can give the same key more folders from a folder's Share dialog.
- View reads. Edit also adds, renames, moves and deletes inside the folder.
- The folder the key was made for cannot itself be renamed, moved or deleted by the key.
- A move stays inside one folder the key was given.
- A key lasts a year unless the owner chose otherwise.
What a key can never do
Whatever its permission: delete anything for good, restore from the trash, restore or delete a version, share or link anything, or reach anything outside its folders.
Deleting moves an item to the vault's trash. Replacing a file keeps the old bytes as a version. The owner sees what a key did in Settings -> Services -> Activity and can undo a rename or a move there.
When a key stops working
| What you see | Why | What to do |
|---|---|---|
invalid_key | the owner revoked it, or it was mistyped | ask the owner for a key |
key_out_of_date | the owner changed their password or recovery key | ask the owner to press Replace key in Settings -> Services, and use the new one |
not_found on everything | the key's end date has passed, or its folder was trashed | ask the owner |
A password change gives the whole vault new keys, so every key issued before it stops being believed by the gateway. That is deliberate: the gateway only trusts a folder the owner signed over, and the owner's signing key changed with the password.
If the owner did not change anything and you see key_out_of_date, tell them. It can mean the vault's server is offering a folder the owner never gave you.
Replacing a key
The owner presses Replace key on the service in Settings. They get a new key for the same folders with the same permissions, and the old key stops at once. Put the new key in your program's environment and restart it. Nothing else changes: the same gateway and the same state folder keep working.