Appwrite. Services. Tokens
(appwrite v1.0.0)
View Source
The Tokens service allows you to create short-lived, scoped file access tokens that grant unauthenticated (or differently-authenticated) access to individual Storage files.
Tokens are a new Appwrite Cloud feature added in v1.0.0.
A token URL can be appended to any Storage file URL via the ?token= query
parameter (see Appwrite.Services.Storage.get_file_download/3, get_file_view/3,
and get_file_preview/3).
Summary
Functions
Create a new file Token.
Delete a Token by its unique ID.
Get a Token by its unique ID.
List all Tokens belonging to the current user.
Update a Token — extend its expiry date or change its scopes.
Functions
Create a new file Token.
Parameters
bucket_id(required) – the bucket the file lives infile_id(required) – the file to grant access toexpire(optional) – ISO 8601 expiration date string; defaults to +30 days
Delete a Token by its unique ID.
Parameters
token_id(required)
Get a Token by its unique ID.
Parameters
token_id(required)
List all Tokens belonging to the current user.
Parameters
queries(optional)
Update a Token — extend its expiry date or change its scopes.
Parameters
token_id(required)expire(optional) – new ISO 8601 expiration date string