跳至正文內容
TursoDB.cn 獨立社群 · MVCC 並行寫入與每 Agent 獨立庫實戰 閱讀解析 →
Turso Cloud API 參考 介面資源 API 權杖

列出 API 權杖

回傳屬於使用者的 API 權杖清單。

GET https://api.turso.tech/v1/auth/api-tokens
curl -L https://api.turso.tech/v1/auth/api-tokens \
  -H 'Authorization: Bearer TOKEN'
import { createClient } from "@tursodatabase/api";

const turso = createClient({
  org: "...",
  token: "",
});

const apiTokens = await turso.apiTokens.list();

OpenAPI

openapi: 3.0.1
info:
  title: Turso Platform API
  description: API description here
  license:
    name: MIT
  version: 0.1.0
servers:
  - url: https://api.turso.tech
    description: Turso's Platform API
security: []
paths:
  /v1/auth/api-tokens:
    get:
      summary: List API Tokens
      description: Returns a list of API tokens belonging to a user.
      operationId: listAPITokens
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  tokens:
                    type: array
                    items:
                      $ref: '#/components/schemas/APIToken'
components:
  schemas:
    APIToken:
      type: object
      properties:
        name:
          type: string
          description: The name given to the API Token.
          example: my-token
        id:
          type: string
          description: The ID generated by Turso for the API Token.
          example: clGFZ4STEe6fljpFzIum8A
        organization:
          type: string
          description: >-
            The organization slug this token is restricted to. Omitted if the
            token has access to all organizations.
          example: my-org
        group:
          type: string
          description: >-
            The group name this token is pinned to. Present only for
            group-scoped tokens.
          example: default
        scopes:
          type: array
          items:
            type: string
          description: >-
            The expanded list of scopes granted to this token. Present only for
            tokens with scopes. Presets passed at creation time (`read-only`,
            `full-access`) are stored as the underlying individual scopes and
            are returned in that form.
          example:
            - db:create
            - db:configure
            - db:mint-token
        created_at:
          type: string
          description: The date the token was created, in `YYYY-MM-DD` format.
          example: '2026-05-21'
同步自官方 Turso 文件倉庫 ( tursodatabase/turso-docs · MIT 開源授權) 檢視官方原文 ↗
搜尋
按 Esc 關閉 · 由 Pagefind 靜態索引驅動