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

# The keys game tokens are signed with

> A JSON Web Key Set. A game's server checks a player's token against it, with the issuer and its project's id as the audience. Keys change rarely: cache them, and fetch them again when a token names a `kid` you don't have.



## OpenAPI

````yaml /api-reference/openapi.json get /games/keys
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /games/keys:
    get:
      tags:
        - Games
      summary: The keys game tokens are signed with
      description: >-
        A JSON Web Key Set. A game's server checks a player's token against it,
        with the issuer and its project's id as the audience. Keys change
        rarely: cache them, and fetch them again when a token names a `kid` you
        don't have.
      responses:
        '200':
          description: The keys
          content:
            application/json:
              schema:
                type: object
                properties:
                  keys:
                    type: array
                    items:
                      $ref: '#/components/schemas/GameTokenKey'
                required:
                  - keys
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    GameTokenKey:
      type: object
      properties:
        kty:
          type: string
        crv:
          type: string
        x:
          type: string
        'y':
          type: string
        kid:
          type: string
        alg:
          type: string
        use:
          type: string
      required:
        - kty
        - crv
        - x
        - 'y'
        - kid
        - alg
        - use
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.