跳到主要内容

账号注销

1. 概述

账号注销是指从游戏区服中删除用户的游戏账号及其所有相关数据。游戏可以通过 PGOS 提供的一组后端 HTTP API 来管理用户账号注销,同时也可以在门户网站上查看相关操作日志。

2. 基本流程

以下时序图展示了由用户发起的典型账号注销流程。

sequenceDiagram participant Game User Game User-->>Account Deletion Service: Initiate a request to delete a player account Account Deletion Service->>PGOS Backend: Mark the player account as DELETING status (Related API: MarkPlayerAsDeleting) Account Deletion Service->>Account Deletion Service: User cooling-off period (e.g., 7 days) countdown starts Game User-->PGOS Backend: User can not LoginPGOS when the account status is DELETING Account Deletion Service->>Account Deletion Service: User cooling-off period countdown ends Account Deletion Service->>PGOS Backend: Actually delete this player's account and its associated data (Related API: ActualDeletePlayer)

在冷静期内,如果用户改变主意,可以撤销账号删除申请。

注意

由于 PGOS 仅提供相关后端 HTTP API,账号删除服务需要由游戏自行搭建,例如:

  • 如果游戏仅想在开发/测试游戏区服中删除测试账号,可以直接调用 ActualDeletePlayer API。
  • 如果游戏希望用户能从游戏客户端发起账号删除: 游戏可以为这些客户端调用设置一个云函数,并通过云函数访问 PGOS 相关后端 HTTP API。
  • 如果游戏希望用户能从网站发起账号删除: 游戏可以搭建网站,并通过网站后端访问 PGOS 相关后端 HTTP API。

3. 后台 HTTP API

The following table is the related backend HTTP APIs, you can click the links to view more details.

API NameDescription
MarkPlayerAsDeletingMark the specified player as DELETING status. After invoking this API, the player will be unable to log in to PGOS.
ClearDeletingStatusClear DELETING status of the specified player. After invoking this API, the player will be able to log in to PGOS again.
CheckPlayerDeletionStatusCheck the deletion status of the specified player.
ActualDeletePlayerActually delete the account of the specified player. After invoking this API, the player's data will be completely deleted.

4. 查看操作日志

登录网络门户,访问您的游戏区服,转到玩家>查询,搜索您想要查看删除日志的玩家。

image-20240320174423729

如果玩家账号被标记为删除,那么您可以在玩家详情概览页面进行查看:

image-20240320175018644

点击删除标签,即可查看该顽家的所有删除操作日志:

image-20240320175242093