Set Player Secret
Sets the player’s secret if it is not already set. Player secrets are used to sign API requests. To reset a player’s secret use the Admin or Server API method SetPlayerSecret.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| PlayerSecretAlreadyConfigured | 1294 |
Authorizations
This API requires a title secret key, available to title admins, from PlayFab Game Manager.
Body
APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the signature.
APIs that require signatures require that the player have a configured Player Secret Key that is used to sign all requests. Players that don't have a secret will be blocked from making API calls until it is configured. To create a signature header add a SHA256 hashed string containing UTF8 encoded JSON body as it will be sent to the server, the current time in UTC formatted to ISO 8601, and the players secret formatted as 'body.date.secret'. Place the resulting hash into the header X-PlayFab-Signature, along with a header X-PlayFab-Timestamp of the same UTC timestamp used in the signature.
