> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fly.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Current Token Information

> Get information about the current macaroon token(s), including organizations, apps, user identity hashes, and machine restrictions



## OpenAPI

````yaml /api/machines/openapi.json get /v1/tokens/current
openapi: 3.1.0
info:
  title: Machines API
  description: >-
    This site hosts documentation generated from the Fly.io Machines API OpenAPI
    specification. Visit our complete [Machines API
    docs](https://fly.io/docs/machines/api/) for how to get started, more
    information about each endpoint, parameter descriptions, and examples.
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://api.machines.dev
security:
  - FlyBearerAuth: []
tags:
  - name: Apps
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/apps-resource/) for details about
      using the Apps resource.
  - name: Machines
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/machines-resource/) for details
      about using the Machines resource.
  - name: TLS Certificates
    description: >
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/certificates-resource/) for details
      about using the TLS Certificates resource.
  - name: Volumes
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/volumes-resource/) for details
      about using the Volumes resource.
  - name: Postgres Clusters
    description: >-
      Create and manage Postgres clusters, including databases, users,
      extensions, backups, and app attachments.
externalDocs:
  url: https://fly.io/docs/machines/working-with-machines/
paths:
  /v1/tokens/current:
    get:
      tags:
        - Tokens
      summary: Get Current Token Information
      description: >-
        Get information about the current macaroon token(s), including
        organizations, apps, user identity hashes, and machine restrictions
      operationId: CurrentToken_show
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentTokenResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CurrentTokenResponse:
      type: object
      properties:
        tokens:
          type: array
          description: >-
            One entry per token in the Authorization header that could be
            verified, in no particular

            order; use `token_id` to tell them apart. Tokens that fail
            verification or are not scoped

            to an organization are left out.
          items:
            $ref: '#/components/schemas/main.tokenInfo'
    ErrorResponse:
      type: object
      properties:
        details:
          type: object
          description: 'Deprecated: details about some errors. Do not rely on its contents.'
        error:
          type: string
          description: >-
            Human-readable description of the error. Its wording may change; use
            `status` to tell

            errors apart.
        status:
          type: object
          description: >-
            Machine-readable error code, set for some errors, such as
            `insufficient_capacity`,

            `volume_placement_capacity`, `name_taken`, `exec_request_too_large`,
            or

            `exec_output_too_large`.
          allOf:
            - $ref: '#/components/schemas/main.statusCode'
    main.tokenInfo:
      type: object
      properties:
        apps:
          type: array
          description: >-
            Names of the apps the token is restricted to. Omitted if the token
            is not restricted to

            specific apps.
          items:
            type: string
        org_slug:
          type: string
          description: Slug of the organization the token is scoped to.
        organization:
          type: string
          description: Name of the organization the token is scoped to.
        restricted_to_machine:
          type: string
          description: >-
            ID of the Machine the token may only be used from. Omitted if the
            token is not restricted

            to a Machine.
        source_machine_id:
          type: string
          description: Never set.
        token_id:
          type: string
          description: ID of the token.
        user:
          type: string
          description: >-
            Opaque identifier of the user the token belongs to: the first 7 hex
            characters of a hash of

            the user's ID. Omitted for tokens that do not belong to a user.
    main.statusCode:
      type: string
      enum:
        - unknown
        - insufficient_capacity
        - volume_placement_capacity
        - exec_request_too_large
        - exec_output_too_large
        - name_taken
      x-enum-varnames:
        - unknown
        - capacityErr
        - volumePlacementCapacityErr
        - execRequestTooLargeErr
        - execOutputTooLargeErr
        - nameTakenErr
  securitySchemes:
    FlyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        A Fly API token with access to the requested organization or resource.
        Send it as `Authorization: Bearer <Fly API token>`.

````