---
updatedAt: 2025-09-11T20:49:51.000Z
agentTools:
  projectIndex: https://docs.pley.com/llms.txt
---

# Verify session token

Use this endpoint to authenticate a user using the session token your received from the Pley SDK in your game client.

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "API v2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.pley.com/v2"
    }
  ],
  "paths": {
    "/auth-kit/verify-session-token": {
      "post": {
        "summary": "Verify session token",
        "operationId": "auth-kit-verify-session-token",
        "description": "Use this endpoint to authenticate a user using the session token your received from the Pley SDK in your game client.",
        "tags": [
          "AuthKit"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session_token": {
                    "type": "string",
                    "description": "Pley's session token"
                  },
                  "play_token": {
                    "type": "string",
                    "description": "Deprecated alias for session_token, used only when session_token is absent"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The session token is valid, returning user details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "game_user": {
                      "type": "object",
                      "properties": {
                        "game_user_id": {
                          "type": "string"
                        },
                        "username": {
                          "type": "string"
                        }
                      }
                    },
                    "game_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "403": {
            "description": "Missing or invalid API token"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "samples-languages": [
      "shell"
    ]
  }
}
```