Account Management - Ban Users

Bans users by PlayFab ID with optional IP address, or MAC address for the provided game.

POST https://titleId.playfabapi.com/Server/BanUsers

Request Body

Name Required Type Description
Bans True

List of ban requests to be applied. Maximum 100.

Responses

Name Type Description
200 OK
400 Bad Request

This is the outer wrapper for all responses with errors

Security

SecretKey

This API requires a title secret key, available to title admins, from PlayFab Game Manager.

Type: apiKey
In: header

Definitions

ApiErrorWrapper

The basic wrapper around every failed API response

BanInfo

Contains information for a ban.

BanRequest

Represents a single ban request.

BanUsersRequest

The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so use this feature with caution. Returns information about the new bans.

BanUsersResult

ApiErrorWrapper

The basic wrapper around every failed API response

Name Type Description
code
  • integer

Numerical HTTP code

error
  • string

Playfab error code

errorCode
  • integer

Numerical PlayFab error code

errorDetails
  • object

Detailed description of individual issues with the request object

errorMessage
  • string

Description for the PlayFab errorCode

status
  • string

String HTTP code

BanInfo

Contains information for a ban.

Name Type Description
Active
  • boolean

The active state of this ban. Expired bans may still have this value set to true but they will have no effect.

BanId
  • string

The unique Ban Id associated with this ban.

Created
  • string

The time when this ban was applied.

Expires
  • string

The time when this ban expires. Permanent bans do not have expiration date.

IPAddress
  • string

The IP address on which the ban was applied. May affect multiple players.

MACAddress
  • string

The MAC address on which the ban was applied. May affect multiple players.

PlayFabId
  • string

Unique PlayFab assigned ID of the user on whom the operation will be performed.

Reason
  • string

The reason why this ban was applied.

BanRequest

Represents a single ban request.

Name Type Description
DurationInHours
  • number

The duration in hours for the ban. Leave this blank for a permanent ban.

IPAddress
  • string

IP address to be banned. May affect multiple players.

MACAddress
  • string

MAC address to be banned. May affect multiple players.

PlayFabId
  • string

Unique PlayFab assigned ID of the user on whom the operation will be performed.

Reason
  • string

The reason for this ban. Maximum 140 characters.

BanUsersRequest

The existence of each user will not be verified. When banning by IP or MAC address, multiple players may be affected, so use this feature with caution. Returns information about the new bans.

Name Type Description
Bans

List of ban requests to be applied. Maximum 100.

BanUsersResult

Name Type Description
BanData

Information on the bans that were applied