Update Player Statistics
Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.
Error codes
This operation may return the following PlayFab errors:
| Error | Code |
|---|---|
| APINotEnabledForGameClientAccess | 1082 |
| DuplicateStatisticName | 1253 |
| ProductDisabledForTitle | 1609 |
| StatisticCountLimitExceeded | 1203 |
| StatisticNameConflict | 1196 |
| StatisticNotFound | 1195 |
| StatisticValueAggregationOverflow | 1308 |
| StatisticVersionClosedForWrites | 1197 |
| StatisticVersionInvalid | 1198 |
Authorizations
This API requires a client session ticket, available from any Client Login function.
Body
Enable this option with the 'Allow Client to Post Player Statistics' option in PlayFab GameManager for your title. However, this is not best practice, as this data will no longer be safely controlled by the server. This operation is additive. Statistics not currently defined will be added, while those already defined will be updated with the given values. All other user statistics will remain unchanged. Note that if the statistic is intended to have a reset period, the UpdatePlayerStatisticDefinition API call can be used to define that reset period. Once a statistic has been versioned (reset), the now-previous version can still be written to for up a short, pre-defined period (currently 10 seconds), using the Version parameter in this call.
Enable this option with the 'Allow Client to Post Player Statistics' option in PlayFab GameManager for your title. However, this is not best practice, as this data will no longer be safely controlled by the server. This operation is additive. Statistics not currently defined will be added, while those already defined will be updated with the given values. All other user statistics will remain unchanged. Note that if the statistic is intended to have a reset period, the UpdatePlayerStatisticDefinition API call can be used to define that reset period. Once a statistic has been versioned (reset), the now-previous version can still be written to for up a short, pre-defined period (currently 10 seconds), using the Version parameter in this call.
