直播用户数据推送
拥有此API的权限集并订阅此消息推送 |
---|
用户管理-查询 |
接口描述
- 当前只推送直播下用户产生变动的数据
- 非直播用户数据不会推送
- 暂无变更的字段不会推送
推送参数
参数名 | 是否必传 | 类型 | 说明 |
---|---|---|---|
type | 是 | string | 推送类型:alive_user_data -- 直播间用户数据 |
app_id | 是 | String | 店铺id |
message_id | 是 | String | 消息ID |
retry_times | 是 | int | 重试次数 |
xe_data | 是 | Object | 业务数据 |
xe_data
参数结构
参数名 | 必选 | 类型 | 说明 |
---|---|---|---|
app_id | 是 | String | 店铺ID |
alive_id | 是 | String | 直播id |
user_id | 是 | String | 用户ID |
share_user_id | 否 | String | 邀请人 |
his_online_time | 否 | Int | 直播间停留时长 |
his_learn_time | 否 | Int | 累计观看时长 |
his_learning_time | 否 | Int | 直播观看时长 |
his_learned_time | 否 | Int | 回放观看时长 |
first_in_time | 否 | String | 首次进入时间 |
last_in_time | 否 | String | 最近进入时间 |
his_learn_times | 否 | Int | 学习次数 |
his_learning_times | 否 | Int | 直播中学习次数 |
his_learned_times | 否 | Int | 回放学习次数 |
his_online_times | 否 | Int | 在线次数 |
finished_at | 否 | String | 完课时间 |
learn_progress | 否 | Int | 学习进度 |
user_total_price | 否 | bigint | 成交金额(分) |
comment_num | 否 | Int | 评论数 |
prize_winner_num | 否 | Int | 中奖数 |
推送解密后示例
<app_id>app*******</app_id>
<message_id>20250922********</message_id>
<retry_times>0</retry_times>
<type>alive_user_data</type>
<xe_data>
<app_id>app*******</app_id>
<alive_id>20250922*******</alive_id>
<user_id>user*******</user_id>
<share_user_id>user*******</share_user_id>
<his_online_time>0</his_online_time>
<his_learn_time>0</his_learn_time>
<his_learning_time>0</his_learning_time>
<his_learned_time>0</his_learned_time>
<first_in_time>2025-09-22 00:00:00</first_in_time>
<last_in_time>2025-09-22 00:00:00</last_in_time>
<his_learn_times>0</his_learn_times>
<his_learning_times>0</his_learning_times>
<his_learned_times>0</his_learned_times>
<his_online_times>0</his_online_times>
<finished_at>2025-09-22 00:00:00</finished_at>
<learn_progress>0</learn_progress>
<user_total_price>0</user_total_price>
<comment_num>0</comment_num>
<prize_winner_num>0</prize_winner_num>
</xe_data>
备注
- 必选参数每次推送均会包含
- 以上数据示例为全部字段,实际推送可能仅包含有变动的字段
- 如:第一次进入直播间first_in_time字段产生变更推送时会携带该字段,后续进入直播间first_in_time字段不再变更,不会再推送该字段(其他字段同理)