Documentation

GetPhotonAuthenticationToken

Gets a Photon custom authentication token that can be used to securely join the player into a Photon room. See https://api.playfab.com/docs/using-photon-with-playfab/ for more details.

Request Details

GetPhotonAuthenticationTokenRequest
Request Properties
PhotonApplicationId (required) String

The Photon applicationId for the game you wish to log into.

POST https://{{TitleID}}.playfabapi.com/Client/GetPhotonAuthenticationToken
    Content-Type: application/json
    X-Authentication: <user_session_ticket_value>
{
  "PhotonApplicationId": "acaa26f3-fcdb-4af4-8c76-3a3d4dd3066f"
}
        

Response Details

GetPhotonAuthenticationTokenResult
Result Properties
PhotonCustomAuthenticationToken String

The Photon authentication token for this game-session.

Sample Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
  "code": 200,
  "status": "OK",
  "data": {
    "PhotonCustomAuthenticationToken": "rod88fits4gqmgor7umopsbabguj441h3oe8u3gbzxf6rktibv"
  }
}

Authentication

SessionTicket

Possible Error Codes

Name Code
PhotonApplicationNotAssociatedWithTitle 1141
PhotonApplicationNotFound 1140
PhotonNotEnabledForTitle 1139