Skip to content

Token Service API Reference

This page describes the API that game clients call to fetch SteelShield Tokens.

Overview

The Token Service exposes a single REST endpoint that game clients call to obtain a SteelShield token. The returned token is used to authenticate legitimate game traffic.

Endpoint

GameFabric provides you with the full URL based on the GameFabric tenant name, the Token Service's configured Game name and the selected platform.

Each supported platform can have its own authentication configuration. See Authentication Types for details, including on what JWT needs to be sent as gameClientToken.

Request

Headers

HeaderRequiredDescription
AuthorizationYesPlatform key as displayed in the Token Service list (see Accessing Token Services). Format as Bearer <key>.
Content-TypeYesAlways set this to application/json.

Body

json
{
  "environment": "prod",
  "authProvider": "eos",
  "gameClientToken": "<JWT>",
  "clientVersion": "1.0.0",
  "userLocalTime": "2024-02-01T09:00:22Z"
}
FieldTypeRequiredDescription
environmentstringYesAn arbitrary identifier for the game client's environment. Not the same as the Token Service's Environment configuration.
authProviderstringYesWhen using Custom Keys or JWKS authentication, the authProvider value is the Developer name configured in the Token Service. When using EOS authentication, the authProvider is always eos.
gameClientTokenstringYesA JSON Web Token (JWT) identifying the client, as handed out by the authentication provider. For Custom keys or JWKS authentication, the JWT payload must contain a ui field providing the player's ID.
clientVersionstringYesThe version of the game client making the request.
userLocalTimestringNoThe current timestamp of the system the game client is running on (RFC 3339 format). Used to detect client-side time drift.

Response

Success (200 OK)

json
{
  "Issuer": "SteelshieldTokenService",
  "IssuedAt": 1658409341,
  "Token": "ASW0nTmza9+Wv79PTIXYZ5dkJhjdHb6hBwAAAH1R2WJwVD8h610xXZ6aeVfQx02GackyvZzTSme+U5Frt+bGhw=="
}
FieldTypeDescription
IssuerstringAlways SteelshieldTokenService.
IssuedAtnumberUnix timestamp of when the token was issued.
TokenstringThe generated SteelShield token (base64-encoded).

Error responses

WARNING

Error codes are only returned on Token Services configured as Development instances. Production instances will mask this.

StatusDescription
400Bad request. Payload is not properly formatted or has missing or invalid data.
401Unauthorized. Platform key is invalid.
403Forbidden. The player is blacklisted.
422Unprocessable Entity. The payload is well-formed but the game client token is invalid or expired.
500Internal Server Error. A server-side error occurred.