Appwrite Tokens API
The Tokens service allows you to create and manage resource tokens for secure file access. 5 operations across 2 paths in the Appwrite 2.0.0 OpenAPI.
The Tokens service allows you to create and manage resource tokens for secure file access. 5 operations across 2 paths in the Appwrite 2.0.0 OpenAPI.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/appwrite-tokens-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.0.0
info:
title: Appwrite Tokens API
description: Appwrite backend as a service cuts up to 70% of the time and costs required for building a modern application. We abstract and simplify common development tasks behind a REST APIs, to help you develop your app in a fast and secure way. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
version: 2.0.0
termsOfService: https://appwrite.io/policy/terms
contact:
name: Appwrite Team
url: https://appwrite.io/support
email: team@appwrite.io
license:
name: BSD-3-Clause
url: https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE
servers:
- url: https://cloud.appwrite.io/v1
description: Appwrite Cloud endpoint.
- url: https://{region}.cloud.appwrite.io/v1
description: Appwrite Cloud regional endpoint. Replace `{region}` with your project region.
variables:
region:
default: fra
description: Appwrite Cloud region.
tags:
- name: tokens
description: The Tokens service allows you to create and manage resource tokens for secure file access.
paths:
/tokens/buckets/{bucketId}/files/{fileId}:
get:
summary: List tokens
operationId: tokensList
tags:
- tokens
description: List all the tokens created for a specific file or bucket. You can use the query params to filter your results.
responses:
'200':
description: Resource Tokens List
content:
application/json:
schema:
$ref: '#/components/schemas/resourceTokenList'
deprecated: false
x-appwrite:
group: files
demo: tokens/list.md
rate-limit: 0
rate-time: 3600
rate-key: url:{url},ip:{ip}
scope: tokens.read
platforms:
- console
- server
packaging: false
public: true
auth:
console:
Project: []
server:
Project: []
Key: []
security:
- Project: []
Key: []
parameters:
- name: bucketId
description: Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
required: true
schema:
type: string
example: <BUCKET_ID>
in: path
- name: fileId
description: File unique ID.
required: true
schema:
type: string
example: <FILE_ID>
in: path
- name: queries
description: 'Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: expire'
required: false
schema:
type: array
items:
type: string
default: []
in: query
- name: total
description: When set to false, the total count returned will be 0 and will not be calculated.
required: false
schema:
type: boolean
example: false
default: true
in: query
post:
summary: Create file token
operationId: tokensCreateFileToken
tags:
- tokens
description: Create a new token. A token is linked to a file. Token can be passed as a request URL search parameter.
responses:
'201':
description: ResourceToken
content:
application/json:
schema:
$ref: '#/components/schemas/resourceToken'
deprecated: false
x-appwrite:
group: files
demo: tokens/create-file-token.md
rate-limit: 60
rate-time: 60
rate-key: ip:{ip},method:{method},url:{url},userId:{userId}
scope: tokens.write
platforms:
- console
- server
packaging: false
public: true
auth:
console:
Project: []
server:
Project: []
Key: []
security:
- Project: []
Key: []
parameters:
- name: bucketId
description: Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
required: true
schema:
type: string
example: <BUCKET_ID>
in: path
- name: fileId
description: File unique ID.
required: true
schema:
type: string
example: <FILE_ID>
in: path
requestBody:
content:
application/json:
schema:
type: object
properties:
expire:
description: Token expiry date
type: string
example: '2020-10-15T06:38:00.000+00:00'
format: datetime
nullable: true
/tokens/{tokenId}:
get:
summary: Get token
operationId: tokensGet
tags:
- tokens
description: Get a token by its unique ID.
responses:
'200':
description: ResourceToken
content:
application/json:
schema:
$ref: '#/components/schemas/resourceToken'
deprecated: false
x-appwrite:
group: tokens
demo: tokens/get.md
rate-limit: 0
rate-time: 3600
rate-key: url:{url},ip:{ip}
scope: tokens.read
platforms:
- console
- server
packaging: false
public: true
auth:
console:
Project: []
server:
Project: []
Key: []
security:
- Project: []
Key: []
parameters:
- name: tokenId
description: Token ID.
required: true
schema:
type: string
example: <TOKEN_ID>
in: path
patch:
summary: Update token
operationId: tokensUpdate
tags:
- tokens
description: Update a token by its unique ID. Use this endpoint to update a token's expiry date.
responses:
'200':
description: ResourceToken
content:
application/json:
schema:
$ref: '#/components/schemas/resourceToken'
deprecated: false
x-appwrite:
group: tokens
demo: tokens/update.md
rate-limit: 60
rate-time: 60
rate-key: ip:{ip},method:{method},url:{url},userId:{userId}
scope: tokens.write
platforms:
- console
- server
packaging: false
public: true
auth:
console:
Project: []
server:
Project: []
Key: []
security:
- Project: []
Key: []
parameters:
- name: tokenId
description: Token unique ID.
required: true
schema:
type: string
example: <TOKEN_ID>
in: path
requestBody:
content:
application/json:
schema:
type: object
properties:
expire:
description: File token expiry date
type: string
example: '2020-10-15T06:38:00.000+00:00'
format: datetime
nullable: true
delete:
summary: Delete token
operationId: tokensDelete
tags:
- tokens
description: Delete a token by its unique ID.
responses:
'204':
description: No content
deprecated: false
x-appwrite:
group: tokens
demo: tokens/delete.md
rate-limit: 60
rate-time: 60
rate-key: ip:{ip},method:{method},url:{url},userId:{userId}
scope: tokens.write
platforms:
- console
- server
packaging: false
public: true
auth:
console:
Project: []
server:
Project: []
Key: []
security:
- Project: []
Key: []
parameters:
- name: tokenId
description: Token ID.
required: true
schema:
type: string
example: <TOKEN_ID>
in: path
components:
schemas:
resourceToken:
description: ResourceToken
type: object
properties:
$id:
type: string
description: Token ID.
example: bb8ea5c16897e
$createdAt:
type: string
description: Token creation date in ISO 8601 format.
example: '2020-10-15T06:38:00.000+00:00'
resourceId:
type: string
description: Resource ID.
example: 5e5ea5c168bb8:5e5ea5c168bb8
resourceType:
type: string
description: Resource type.
example: files
expire:
type: string
description: Token expiration date in ISO 8601 format.
example: '2020-10-15T06:38:00.000+00:00'
secret:
type: string
description: JWT encoded string.
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
accessedAt:
type: string
description: Most recent access date in ISO 8601 format. This attribute is only updated again after 24 hours.
example: '2020-10-15T06:38:00.000+00:00'
required:
- $id
- $createdAt
- resourceId
- resourceType
- expire
- secret
- accessedAt
example:
$id: bb8ea5c16897e
$createdAt: '2020-10-15T06:38:00.000+00:00'
resourceId: 5e5ea5c168bb8:5e5ea5c168bb8
resourceType: files
expire: '2020-10-15T06:38:00.000+00:00'
secret: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
accessedAt: '2020-10-15T06:38:00.000+00:00'
resourceTokenList:
description: Resource Tokens List
type: object
properties:
total:
type: integer
description: Total number of tokens that matched your query.
format: int32
example: 5
tokens:
type: array
description: List of tokens.
items:
$ref: '#/components/schemas/resourceToken'
example: []
required:
- total
- tokens
example:
total: 5
tokens: ''
securitySchemes:
Key:
type: apiKey
name: X-Appwrite-Key
description: Your secret API key
in: header
x-appwrite:
platforms:
- server
- console
- manager
demo: <YOUR_API_KEY>
Project:
type: apiKey
name: X-Appwrite-Project
description: Your project ID
in: header
x-appwrite:
platforms:
- client
- server
- console
demo: <YOUR_PROJECT_ID>
externalDocs:
description: Full API docs, specs and tutorials
url: https://appwrite.io/docs