> ## 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.

# Start a sign-in

> Open this in a popup or the system browser. The player signs in and approves your game, then Gamavas redirects to `redirect_uri` with `code` and `state` (or `error`, e.g. `access_denied`). PKCE with S256 is required.



## OpenAPI

````yaml /api-reference/openapi.json get /auth/oauth2/authorize
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:
  /auth/oauth2/authorize:
    get:
      tags:
        - Sign-in
      summary: Start a sign-in
      description: >-
        Open this in a popup or the system browser. The player signs in and
        approves your game, then Gamavas redirects to `redirect_uri` with `code`
        and `state` (or `error`, e.g. `access_denied`). PKCE with S256 is
        required.
      parameters:
        - name: response_type
          in: query
          required: true
          schema:
            type: string
            const: code
        - name: client_id
          in: query
          required: true
          schema:
            type: string
        - name: redirect_uri
          in: query
          required: true
          description: >-
            Exactly as registered: your game's page, `http://127.0.0.1/` (any
            port) for desktop, or `com.studio.game:/pass` for mobile.
          schema:
            type: string
        - name: scope
          in: query
          required: true
          description: >-
            Space-separated: `openid profile offline_access progress`, plus
            `email` if you need it.
          schema:
            type: string
        - name: state
          in: query
          required: true
          schema:
            type: string
        - name: code_challenge
          in: query
          required: true
          schema:
            type: string
        - name: code_challenge_method
          in: query
          required: true
          schema:
            type: string
            const: S256
        - name: nonce
          in: query
          schema:
            type: string
      responses:
        '302':
          description: To the sign-in page, then back to `redirect_uri`.
      security: []

````

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