Last Updated: 7/19/2021, 8:15:50 AM

# User Bans

# Overview

Ban Management allows you to restrict access to your game or particular in-game features from players that exhibit inappropriate player behavior, in order to preserve a healthy community in your game. There are two ways to carry out a ban:

  • Global Bans restrict access to your game by revoking all of the banned player’s session IDs.
  • Specific Bans restrict access to specific in-game features by invalidating the specific session ID for that feature. These types of bans are temporary, once they expire the player will regain access to the feature they were banned from. The ban duration is configurable.

Ban Management includes two main actions: banning a player from your game and lifting a ban from a player. Banning and unbanning players require administrator access, and can be performed directly from the Admin Portal or indirectly by calling the API.

# Prerequisites

Make sure you’re authorized to use our services and have the following permissions before you attempt to manage player bans:

Usage Permissions
Ban a Player ADMIN:NAMESPACE:{namespace}:BAN:USER:{userId} [CREATE]
Enable or Disable Player’s Ban ADMIN:NAMESPACE:{namespace}:BAN:USER:{userId} [UPDATE]
Retrieve Ban Types and Reasons ADMIN:BAN [READ]

# Ban Types

There are many different types of specific bans that can be applied to players. Here is a list of each ban type and what they ban players’ from accessing:

Ban Type
Description
CHAT_SEND Ban players from sending messages.
CHAT_ALL Ban players from all chat related activities.
VOICE_SEND Ban players from sending voice messages.
VOICE_ALL Ban players from all voice chat related activities.
COMMUNITY Ban players from the community for a specific reason related to harassment, posting hateful content, etc.
TRADE_INITIATE Ban players from initiating trades.
TRADE_ALL Ban players from all trading activities.
ORDER_AND_PAYMENT Ban players from placing orders and making payments from the store.
MARKETPLACE_LIST Ban players from seeing what items are listed in the marketplace.
MARKETPLACE_ALL Ban players from all marketplace-related activities.
LOGIN Ban players from logging in.
STATISTICS Users will be banned from all services that rely on statistics, such as achievements, rewards, and leaderboards. However, a statistics ban won't have any direct impact on those services for the banned player, so a game admin can manually unlock an achievement for the player or place the player on a leaderboard.

# Ban Reasons

Here is a list of all the reasons a player can be banned:

Reason
Description
VIOLENCE Ban players for posting violent content.
HARASSMENT Ban players for harassing other players.
HATEFUL_CONDUCT Ban players for acting hateful towards other players.
OFFENSIVE_USERNAME Ban players for having an offensive username.
IMPERSONATION Ban players for impersonating other players.
MALICIOUS_CONTENT Ban players for posting malicious content such as spam, scams, etc.
SEXUALLY_SUGGESTIVE Ban players for posting sexually explicit or suggestive content.
SEXUAL_VIOLENCE Ban players for acting sexually violent or exploiting other players.
EXTREME_VIOLENCE Ban players for extreme violence such as gore and other obscene content.
UNDERAGE_USER Ban players for being underage.
CHEATING Ban players for cheating.
TOS_VIOLATION Ban players for Terms of Service violations.

# Tutorials

# Managing Bans in the Admin Portal

The Admin Portal gives community managers and game admins an easy way to ban and unban players.

# Ban a Player

  1. In the Admin Portal, go to the User menu and type the Email or Display Name of the player you want to ban.

    user-ban-management

  2. Once you’re in the player’s dashboard, switch to the Bans tab.

    user-ban-management

  3. To ban the player, click the Add Ban button.

    user-ban-management

  4. Fill in the required information:

    • Select the appropriate Ban Type from the dropdown list. Refer to the Ban Types list above for more details.
    • Choose how you want to set the Ban Expiration:
      • Choose Set Expiration Duration to set the ban duration in days.
      • Choose Set Expiration Date to set an expiration date for the ban.
      • Choose Never if you want the ban to be permanent.
    • Select the ban Reason from the dropdown list. Refer to the Ban Reasons list above for more details.
    • Type a Comment that includes any relevant information about the ban.

In the image below, the player will be banned from the game for one day due to cheating.

user-ban-management

  1. When you’re done, click the Bans button. The new ban will appear in the Bans list.

    user-ban-management

  2. On the player’s side, they will receive an email saying that they have been banned temporarily for cheating.

    user-ban-management

# Enable and Disable a Player’s Ban

  1. In the Admin portal, go to Users and search for the player whose ban you want to manage. In the player’s Bans list you can find the ban that you want to enable or disable.

    user-ban-management

  2. Click Enable or Disable on the ban listing to enable or disable the ban. After you click, a confirmation message will appear.

    user-ban-management

  3. After you disable a ban, the player will receive an email informing them that the ban has been lifted and that they can now access the game or the feature they were banned from. If you enable a ban for a player, they will also receive an email informing them of their ban.

    user-ban-management

# Managing Bans Using API

You can also use our API to manage player bans. Here are a couple of other endpoints that can help you when you’re banning a player.

# Ban a Player

To ban a player, follow these steps:

  1. Use the Ban a Single User: POST - /iam/v3/admin/namespaces/{namespace}/users/{userId}/bans (opens new window) endpoint.
  2. Input the desired namespace into the Namespace field. Most of the time this will be the game namespace, so that the player is banned from the game in which they broke the rules. If you input your publisher namespace, that player will be banned from your Player Portal and Launcher, as well as all of your games in which the player uses the same account.
  3. Input the player’s User ID using UUID 4 format, without hyphens.
  4. Fill out the Request Body:
    • Input the Ban Type. Refer to the list of Ban Types above for more information.
    • Input a Comment containing any relevant information about how the ban will be carried out.
    • Input the date the ban will end in the End Date field. This field is required, so if you want the ban to be permanent you can input a date in the distant future with RFC3339 (opens new window) standard format, e.g. 3020-10-02T15:00:00.05Z.
    • Input the Reason the player is being banned. Refer to the list of Ban Reasons above for more information.

Upon successful request, the ban will be enabled and the banned player will not be able to access the specified feature of your game. Here is an example of the response to a successful request:

# Enable or Disable a Player’s Ban

If you’ve previously banned a player, this ban can be disabled or re-enabled as needed. Follow these steps to make the request:

  1. Use the Enable or disable ban for a single user: PATCH - /iam/v3/admin/namespaces/{namespace}/users/{userId}/bans/{banId} (opens new window) endpoint.
  2. Input the namespace the player was banned on into the Namespace field. If you’re unsure which namespace the player was banned from, you can check by retrieving their ban history.
  3. Input the player’s user ID into the User ID field.
  4. Input the Ban ID using UUID version 4 formatting, without hyphens. If you’re unsure of the Ban ID, you can also find it by retrieving the player’s ban history before attempting to enable or disable a ban.
  5. Fill out the Request Body:
    • Set the Enabled parameter to true to enable the ban, or to false to disable the ban.

Upon successful request, the ban will be enabled or disabled. Here is an example of the response to a successful request:

# Get a Player’s Ban History

To retrieve a player's ban history, follow these steps to make the request:

  1. Use the Get User’s Bans: GET - /iam/v3/public/namespaces/{namespace}/users/{userId}/bans (opens new window) endpoint.
  2. Input the namespace where the player belongs into the Namespace field. This is most likely the game namespace but could be the publisher namespace for players that have been banned from your Player Portal or Launcher.
  3. Input the player’s User ID using UUID 4 format, without hyphens.

Upon successful request, the player’s ban history will be retrieved. Here is an example of the response to a successful request: