Get player by ID

Retrieves an existing player by ID. Returns player information including profile data and in-game currency balance.

GET
/api/v1/player
x-stash-hmac-signature<token>

Versioned HMAC-SHA256 signature for server-to-server communication between game backends and Stash services. Recommended over the deprecated legacyHmac scheme for the best security. Header format: v1;{shopId};{unixMillisTimestamp};{base64Signature} (semicolon-delimited). {base64Signature} is the base64-encoded HMAC-SHA256 of the string {unixMillisTimestamp}.{requestBody} signed with your Egress API key, where {requestBody} is the compact request JSON. The timestamp must be within 5 minutes of Stash server time. Your shopId is your immutable shop identifier; it and your Egress API key are available in Stash Studio under Project Settings > API Secrets.

In: header

Query Parameters

playerIdstring

The player ID to retrieve

shopId?string

The originating Stash shop identifier (mirrors the shopId sent in webhooks)

environment?string

Payment environment for the request

Value in"PAYMENT_ENVIRONMENT_UNSPECIFIED" | "PAYMENT_ENVIRONMENT_TEST" | "PAYMENT_ENVIRONMENT_PRODUCTION"

Response Body

curl -X GET "https://loading/api/v1/player?playerId=string&shopId=string&environment=PAYMENT_ENVIRONMENT_UNSPECIFIED"
{
  "player": {
    "playerId": "string",
    "name": "string",
    "avatarUrl": "string",
    "language": "string",
    "inGameLevel": 0,
    "inGameCurrency": 0
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string",
      "property1": null,
      "property2": null
    }
  ]
}

How is this guide?