Bans Reference #
Ban an account #
The following Operator, Partner, and Service endpoints are available to ban an account:
AccountRpc.BanAccountOperatorV1Request
AccountRpc.BanAccountPartnerV1Request
AccountRpc.BanAccountServiceV1Request
View an account’s ban history #
The following Operator, Partner, and Service endpoints are available to view an account’s ban history:
AccountRpc.GetBansBySocialIdOperatorV1Request
AccountRpc.GetBansBySocialIdPartnerV1Request
AccountRpc.GetBansBySocialIdServiceV1Request
Show a player their account’s ban history:
Player->Session()->BansApi().GetBans(Delegate);
Player.BansApi.GetBans();
The player will retrieve a list of bans.
Revoke a ban #
The following Operator, Partner, and Service endpoints are available to revoke a ban:
AccountRpc.RevokeBanAccountOperatorV1Request
AccountRpc.RevokeBanAccountPartnerV1Request
AccountRpc.RevokeBanAccountServiceV1Request
Ban notification customization #
The Player Social Portal will display an Account Banned error page for banned players attempting to log in. This error page is a customizable swappable component under Account.Bans.AccountBannedDisplay
. See Swappable Components for more details.
Data classes #
There are two main data classes within the Bans feature: BanRecord
and Ban
.
Ban record #
Below is the data included in the BanRecord
object. BanRecord
contains additional data about the ban we expose to only Operators and not to players.
property | description |
---|---|
ban | Contains information on the account’s ban. |
bannedBy | Usually the Operator ID of the Operator who created the ban. Additional cases would be all 0s when submitted by the system. |
revokedBy | optional Usually the Operator ID of the Operator who revoked the ban. Additional cases would be all 0s when submitted by the system. This is only set if the ban has been revoked. |
comment | optional Additional context for the ban. |
Ban #
Ban
contains information regarding a ban issued on a player’s account.
property | description |
---|---|
banId | The ID of the ban. |
pragmaSocialId | The account’s Pragma Social ID. |
revoked | Boolean that determines whether the ban is active. |
gameShardId | optional This is only needed if the banScope is BAN_SCOPE_GAME_SHARD and is the game shard ID that you want to add a ban to. If you’re banning from the game server, this will be the current game shard the player is connected to. |
startTimestampMillis | Time in milliseconds for when the ban started. |
durationInMillis | optional Defaults to MAX_LONG which makes the ban permanent. This is the time in milliseconds the ban is active. |
banScope | enum that determines whether the ban applies to the current game shard or all game shards.BAN_SCOPE_GAME_SHARD : Ban account from current game shard.BAN_SCOPE_ALL_GAME_SHARDS : Ban account from all game shards.BAN_SCOPE_FULL_ACCOUNT : Ban account from both social and all game shards. |
banReason | enum that describes the reason the account is receiving a banPragma has the EXT_BAN_REASON_UNSPECIFIED enum which can be used for your bans. To add your own custom ban reasons see Extension data. |