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

# Validate JWT token

> Validate player JWT token for game access



## OpenAPI

````yaml api-reference/openapi.json post /api/internal/auth/validate-token
openapi: 3.1.0
info:
  title: Tournament Platform API
  description: >-
    Comprehensive API for managing real-time multiplayer tournaments with Game
    Platform integration. Includes both external Casino Integration APIs and
    internal Game Platform APIs.
  version: 1.0.0
  license:
    name: MIT
  contact:
    name: Tournament Platform Support
    url: https://ts.playservices.tech/
    email: support@playservices.tech
servers:
  - url: https://ts.playservices.tech/api
    description: Production server
security:
  - OperatorAPIKey: []
  - InternalAPIKey: []
paths:
  /api/internal/auth/validate-token:
    post:
      tags:
        - Game Platform - Authentication
      summary: Validate JWT token
      description: Validate player JWT token for game access
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: JWT token to validate
              required:
                - token
      responses:
        '200':
          description: Token validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenValidationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - InternalAPIKey: []
components:
  schemas:
    TokenValidationResponse:
      type: object
      properties:
        valid:
          type: boolean
        tournament_id:
          type: string
        internal_player_id:
          type: string
        display_name:
          type: string
        external_user_id:
          type: string
        operator_id:
          type: string
        tournament_context:
          type: object
        player_context:
          type: object
        permissions:
          type: array
          items:
            type: string
        room_assignment:
          type: string
          example: tournament_123_crash-classic
        game_slug:
          type: string
        token_expires_at:
          type: string
          format: date-time
        error:
          type: string
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication failed or insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OperatorAPIKey:
      type: http
      scheme: bearer
      description: >-
        Operator API key with role-based permissions (tournaments.read,
        players.write, etc.)
    InternalAPIKey:
      type: apiKey
      in: header
      name: X-Internal-Api-Key
      description: Internal API key for Game Platform integration

````