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

# Verify a player

> Send the access token your game got at sign-in. Only live tokens issued to your game are accepted, so your server can trust the answer. Profile and email follow the scopes the player approved.



## OpenAPI

````yaml /api-reference/openapi.json post /pass/v1/server/players/verify
openapi: 3.1.0
info:
  title: Gamavas Pass API
  version: 1.0.0
  summary: Sign in with Gamavas, achievements and XP, selling games, and webhooks.
  description: >-
    Games sign players in with OAuth 2.1 and PKCE (the SDKs do this for you),
    then call the game API with the player's access token. A game's server uses
    a secret key (`gmv_sk_live_…`, or `gmv_sk_test_…` for test purchases) and
    never sends it from a browser. Errors are JSON: `{ "error": "what happened"
    }`.
  contact:
    name: Gamavas developers
    url: https://docs.gamavas.fun
servers:
  - url: https://gamavas.fun/api
    description: Gamavas
security: []
tags:
  - name: Sign-in
    description: OAuth 2.1 and OpenID Connect. The SDKs do this for you.
  - name: Game
    description: Called by your game with the player's access token.
  - name: Server
    description: Called by your server with a secret key.
  - name: Webhooks
    description: Sent by Gamavas to your server.
paths:
  /pass/v1/server/players/verify:
    post:
      tags:
        - Server
      summary: Verify a player
      description: >-
        Send the access token your game got at sign-in. Only live tokens issued
        to your game are accepted, so your server can trust the answer. Profile
        and email follow the scopes the player approved.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - accessToken
              properties:
                accessToken:
                  type: string
      responses:
        '200':
          description: The player.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifiedPlayer'
        '400':
          description: No `accessToken` in the body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Invalid secret key, or the token expired, was revoked or is for
            another game.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The request came from a browser: secret keys only work from a
            server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Too many requests: slow down and retry.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - secretKey: []
components:
  schemas:
    VerifiedPlayer:
      type: object
      required:
        - playerId
        - handle
        - displayName
        - avatarUrl
        - email
        - scopes
      additionalProperties: false
      properties:
        playerId:
          type: string
          description: The player's Gamavas ID, the same in every game.
        handle:
          type:
            - string
            - 'null'
        displayName:
          type:
            - string
            - 'null'
        avatarUrl:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
          description: With the `email` scope, if they agreed.
        scopes:
          type: array
          items:
            type: string
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
          description: What happened, in words.
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >-
        A secret key from your app's Keys page (`gmv_sk_live_…` or
        `gmv_sk_test_…`).

````

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