Documentation

RedeemMatchmakerTicket

Validates a Game Server session ticket and returns details about the user

Request Details

This function is used by a Game Server Instance to validate with the PlayFab service that a user has been registered as connected to the server. The Ticket is provided to the client either as a result of a call to StartGame or Matchmake, each of which return a Ticket specific to the Game Server Instance. This function will fail in any case where the Ticket presented is not valid for the specific Game Server Instance making the call. Note that data returned may be Personally Identifying Information (PII), such as email address, and so care should be taken in how this data is stored and managed. Since this call will always return the relevant information for users who have accessed the title, the recommendation is to not store this data locally.

RedeemMatchmakerTicketRequest
Request Properties
LobbyId (required) String

Unique identifier of the Game Server Instance that is asking for validation of the authorization ticket.

Ticket (required) String

Server authorization ticket passed back from a call to Matchmake or StartGame.

POST https://{{TitleID}}.playfabapi.com/Server/RedeemMatchmakerTicket
    Content-Type: application/json
    X-SecretKey: <developer_secret_key>
{
  "Ticket": "2398349939a03499bc",
  "LobbyId": "2353"
}
        

Response Details

RedeemMatchmakerTicketResult
Result Properties
Error String

Error value if the ticket was not validated.

TicketIsValid (required) Boolean

Boolean indicating whether the ticket was validated by the PlayFab service.

UserInfo UserAccountInfo

User account information for the user validated.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "TicketIsValid": true,
    "Error": "",
    "UserInfo": {
      "PlayFabId": "10931252888739651331",
      "Created": "0001-01-01T00:00:00Z",
      "Username": "accountname"
    }
  }
}

Authentication

SecretKey

Possible Error Codes

Name Code
ExpiredGameTicket 1116
GameNotFound 1024
GameTicketDoesNotMatchLobby 1117
InvalidGameTicket 1115