# [Mini Program Live] Member Management Interface
Name | Function explaination |
---|---|
Setting Member Roles | Call this interface to set the administrator, operator, and anchor roles of the Mini Program live members |
Remove member roles | Call this interface to remove the administrator, operator, and anchor roles of the Mini Program live member |
Query Member List | Call this interface to query Mini Program for live member list |
# I. Introduction
Live member management interface, is the Mini Program live provides developers to live members of the bulk management interface capabilities.
Developers can set through the interface, query, remove the role of live members, different roles have different management permissions, please seeMini Program live member management instructions。
# Second, the interface document
# 1. Setting Member Roles
# Interface explaination:
Call this interface to set the administrator, operator, and anchor roles of the Mini Program live members
# Call frequency
Call quota: 10000 times/One day.
# Request method
POST
# Requested URL:
https://api.weixin.qq.com/wxaapi/broadcast/role/addroleaccess_token=
# Sample request parameters: json
{
username: 'test_1', // WeChat
role: 1, // Value[1 - Administrator, 2 - Anchor, 3 - Operator]Setting the super administrator will be invalid
}
# Request parameter meaning
parameter | type | Required | Introductions |
---|---|---|---|
username | String | yes | User's WeChat ID |
role | Number | yes | Set the user's role |
# Return Examples Correctly
{
"errcode": 0,
}
# Return Parameter Meaning
parameter | Introductions |
---|---|
codeurl | If the anchor is not real-name authentication, you need to go to the "Mini Program live" to verify your real name, Mini program two-dimensional code link:https://res.wx.qq.com/on_nothing/9rSix1dhHfK4rR049JL0PHJ7TpOvkuZ3mE0z7Ou_Etvjf-w1J_jVX0rZqeStLfwh |
# 2. Dissolution of membership
# Interface explaination:
Call this interface to remove the administrator, operator, and anchor roles of the Mini Program live member
# Call frequency
Call quota: 10000 times/One day.
# Request method
POST
# Requested URL:
https://api.weixin.qq.com/wxaapi/broadcast/role/deleteroleaccess_token=
# Sample request parameters: json
{
username: 'test_1', // WeChat
role: 1, // Value[1 - Administrator, 2 - Anchor, 3 - Operator]Deleting the super administrator will not work
}
# Request parameter meaning
parameter | type | Required | Introductions |
---|---|---|---|
username | String | yes | User's WeChat ID |
role | Number | yes | Remove a user's role |
# Return Examples Correctly
{
"errcode": 0,
}
# 3. Query the list of members
# Interface explaination:
Call this interface to query Mini Program for live member list
# Call frequency
Call quota: 10000 times/One day.
# Request method
GET
# Requested URL:
https://api.weixin.qq.com/wxaapi/broadcast/role/getrolelistaccess_token=
# URL query parameter
{
role: 1, // Value [-1 - All members, 0 - super administrator, 1 - administrator, 2 - anchor, 3 - operator]
offset: 0, // Initial offset
limit: 10, // Number of queries, maximum 30, default 10
keyword: 'test_1' // Search micro signal, do not return to all
}
# Request parameter meaning
parameter | type | Required | Introductions |
---|---|---|---|
role | Number | no | User roles for queries, values [-1 - All members, 0 - super administrator, 1 - administrator, 2 - anchor, 3 - operator]Default -1 |
offset | Number | no | The starting offset, Default 0 |
limit | Number | no | Number of queries, maximum 30, default 10 |
keyword | String | no | Search micro signal or nickname, do not pass, return all |
# Return Examples Correctly
{
"errcode": 0,
"total" : 1, // Total number
"list": [{
"headingimg": " http://wx.qlogo.cn/mmhead/Q3auHgzwzM5jBhFwrHoeoaxTlhP9YzlVica7wu6lZLnGreKAj7CVicA/0", // avatar
"nickname": "test1", // nickname
"openid": "o7esq5MvImF2SEm7OHYohausj2o",
"roleList": [2, 3], // Have an identity,[0 - super administrator, 1 - administrator, 2 - anchor, 3 - operator]
"updateTimestamp": "1600340080", // Update time
"username": "o0****0o", //Desmin Wechat number
}]
}
# Return Parameter Meaning
parameter | Introductions |
---|---|
total | Total number |
list | List of characters |
headingimg | WeChat user profile url |
nickname | WeChat user's nickname |
openid | openid |
roleList | Have an identity,[0 - super administrator, 1 - administrator, 2 - anchor, 3 - operator] |
updateTimestamp | Update time |
username |
# Appendix: Error codes
-1: System error
400001: Micro-signal non-compliance
400002: WeChat account need real name authentication, only set anchor role may appear
400003: Maximum number of roles added (10 admins, 500 operators, 500 anchors)
400004: Repeat adding roles
400005: Anchor role deletion failed, the anchor is not broadcast live room