Polyv Help Center

Help Center

Channel User Group API

Updated: 2026-04-09 17:41:40

This document corresponds to ChannelViewerGroupController.
This is a live streaming backend login API. userId is automatically injected by the system based on the current logged-in account and does not need to be passed from the frontend.
User-side API prefix: /live-bg/v3/user/channel-viewer/group
Teacher-side API prefix: /live-bg/v3/teacher/channel-viewer/group

1. Query Group List Under a Channel

  • API Endpoint
    • GET /live-bg/v3/user/channel-viewer/group/list
    • GET /live-bg/v3/teacher/channel-viewer/group/list
  • Request Parameters
Parameter Required Type Description
channelId Yes Integer Channel ID
  • Processing Notes

    • If no groups exist under the channel, the system will automatically create 3 default groups: 第一小组, 第二小组, 第三小组
  • Response data Fields

Parameter Type Description
id Long Group ID
channelId Long Channel ID
name String Group name
viewerCount Integer Number of users associated with the group
  • Request Example
GET /live-bg/v3/user/channel-viewer/group/list?channelId=123456
  • Response Example
{
  "code": 200,
  "status": "success",
  "success": true,
  "data": [
    {
      "id": 1,
      "channelId": 123456,
      "name": "第一小组",
      "viewerCount": 12
    },
    {
      "id": 2,
      "channelId": 123456,
      "name": "第二小组",
      "viewerCount": 8
    }
  ]
}

2. Add a Channel Group

  • API Endpoint
    • POST /live-bg/v3/user/channel-viewer/group/save
    • POST /live-bg/v3/teacher/channel-viewer/group/save
  • Request Body Parameters
Parameter Required Type Description
channelId Yes Integer Channel ID
name Yes String Group name, maximum 128 characters
  • Response data Fields
Parameter Type Description
id Long Group ID
channelId Long Channel ID
name String Group name
viewerCount Integer Number of users associated with the group, defaults to 0 after creation
  • Request Example
{
  "channelId": 123456,
  "name": "重点用户组"
}

3. Update a Channel Group

  • API Endpoint
    • POST /live-bg/v3/user/channel-viewer/group/update
    • POST /live-bg/v3/teacher/channel-viewer/group/update
  • Request Body Parameters
Parameter Required Type Description
channelId Yes Integer Channel ID
id Yes Long Group ID
name Yes String New group name, maximum 128 characters
  • Request Example
{
  "channelId": 123456,
  "id": 1,
  "name": "高意向用户组"
}

4. Delete a Channel Group

  • API Endpoint
    • POST /live-bg/v3/user/channel-viewer/group/delete
    • POST /live-bg/v3/teacher/channel-viewer/group/delete
  • Request Body Parameters
Parameter Required Type Description
channelId Yes Integer Channel ID
id Yes Long Group ID
  • Processing Notes

    • Before deleting a group, the system will first unbind the group relationship for users under that group. Users themselves will not be deleted.
  • Request Example

{
  "channelId": 123456,
  "id": 1
}
联系客服,在线咨询