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

# Get anon key (deprecated)

> Deprecated - use GET /api/metadata/anon-key instead. Returns the project's opaque anon key (`anon_...`) under the legacy `accessToken` field for backward compatibility. The anon key is a non-secret client identifier that maps requests to the `anon` role; it replaces the former non-expiring anonymous JWT and can be rotated via POST /api/secrets/anon-key/rotate (admin only).



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml post /api/auth/tokens/anon
openapi: 3.0.3
info:
  title: Insforge Authentication API
  version: 2.0.0
  description: Authentication endpoints with separated auth and profile tables
servers: []
security: []
paths:
  /api/auth/tokens/anon:
    post:
      tags:
        - Admin
      summary: Get anon key (deprecated)
      description: >-
        Deprecated - use GET /api/metadata/anon-key instead. Returns the
        project's opaque anon key (`anon_...`) under the legacy `accessToken`
        field for backward compatibility. The anon key is a non-secret client
        identifier that maps requests to the `anon` role; it replaces the former
        non-expiring anonymous JWT and can be rotated via POST
        /api/secrets/anon-key/rotate (admin only).
      responses:
        '200':
          description: Anon key retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  accessToken:
                    type: string
                    description: Opaque anon key (legacy field name kept for compatibility)
                    example: >-
                      anon_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd
                  message:
                    type: string
                    description: Success message
                    example: >-
                      Anon key retrieved successfully (deprecated route, use GET
                      /api/metadata/anon-key)
        '401':
          description: Unauthorized - requires authentication
        '403':
          description: Forbidden - admin access required
        '404':
          description: Anon key not initialized
      deprecated: true
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````