You need to enable JavaScript to run this app.
导航
角色新建
最近更新时间:2025.03.28 09:56:52首次发布时间:2025.03.28 09:56:52
我的收藏
有用
有用
无用
无用

订阅该事件后,当有新角色被创建(如静态角色、动态角色)时触发该事件。

事件结构体

参数

类型

描述

schema

string

事件消息格式版本。当前固定为 1.0

header

object

消息头,包含事件的基础信息。

└ event_id

string

事件 ID,每个消息的事件 ID 唯一。

└ token

string

验证 token,取值与飞连事件订阅的加密策略内设置的 Verification Token 一致,通过验证该值可以确保消息来自飞连。

└ create_time

string

事件发送时间,Unix 时间戳(单位毫秒)。

└ event_type

string

事件类型。当前事件的类型为 role.v1.create

└ app_id

string

事件回调配置 ID。

data

object

事件数据。

└ events

object[]

事件详细数据列表,支持数组格式。

└└ object

object

角色信息。

└└└ open_id

string

角色 ID。

└└└ name

string

角色名称。

└└└ description

string

角色描述。

└└└ role_type

int

角色类型。可能值:

  • 1:角色库角色
  • 2:自定义角色

└└└ mode

int

角色模式。可能值:

  • 0:静态角色
  • 1:动态角色

└└└ create_time

int64

创建时间,Unix 时间戳(单位秒)。仅在有值时展示该参数。

└└└ update_time

int64

更新时间,Unix 时间戳(单位秒)。仅在有值时展示该参数。

数据示例
{
  "schema": "1.0",
  "header": {
    "event_id": "e09288e2-a1b3-4b38-84a8-3c673725xxxx",
    "token": "token-test",
    "create_time": "1740385174957",
    "event_type": "role.v1.create",
    "app_id": "897957767eda448e9e3c53c6a51dxxxx"
  },
  "data": {
    "events": [
      {
        "object": {
          "open_id": "or_6Mxxxx",
          "name": "角色名称",
          "description": "角色描述",
          "role_type": 2,
          "mode": 0,
          "create_time": 1735873104,
          "update_time": 1735873104
        }
      }
    ]
  }
}