본문 바로가기
WIKI 기술 지식 베이스

API 토큰 목록

원문 보기 위키 갱신

API 토큰 목록 (List API Tokens)

사용자 계정에 속한 API 토큰 목록을 확인하는 엔드포인트예요. 어떤 토큰이 어떤 조직·그룹에 어떤 권한으로 묶여 있는지 점검할 때 유용해요.

출처: 문서

본문

Returns a list of API tokens belonging to a user.

GET /v1/auth/api-tokens를 호출하면 사용자 계정의 API 토큰 목록을 돌려줘요.

```bash cURL theme={null} curl -L https://api.turso.tech/v1/auth/api-tokens \ -H 'Authorization: Bearer ***' ```
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
            group-scoped tokens. 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'

더 알아보기 (Learn more)