Xsolla-logoXsolla Developers
前往发布商帐户

封禁用户Server-side

post/projects/{project_id}/users/{user_id}/ban

Add a ban to the user, either for a specific period or permanently.

SecurityServer
Request
path Parameters
project_id
required
string <uuid>

发布商帐户中的登录管理器项目ID。

user_id
required
string <uuid>

用户ID。您可以在发布商帐户 > 您的登录管理器项目 > 用户中找到它。

Request Body schema: application/json
reason
required
string [ 1 .. 255 ] characters

A short explanation for why the user is being banned.

date_from
string or null

The starting date and time when the user ban becomes effective. Must be provided in the following format 'YYYY-MM-DDTHH:MM:SS+0000' (e.g., '2025-04-29T14:30:00+0000').

date_to
string or null

The ending date and time when the user ban expires. Must be provided in the following format: 'YYYY-MM-DDTHH:MM:SS+0000' (e.g., '2025-04-29T14:30:00+0000').

Responses
204

确定。

400

错误的请求

401

未授权

403

被禁止

404

未找到

422

无法处理的实体

Request samples
application/json
{
  • "date_from": "string",
  • "date_to": "string",
  • "reason": "string"
}
Response samples
{
  • "error": {
    }
}