添加用户加入群组。群组的所有成员都可以添加用户进群。无须对方同意。
被移除的成员亦通过该方法重新加入群组。
Request
HTTP request
POST https://www.featapi.com/api/party/group/{id}/add_member/
Parameters
Path parameters
Parameter name | Value | Description |
---|---|---|
id | integer | 群组 ID |
Authorization
该请求需要授权以下scopes访问权限:
Scopes |
---|
party_group |
For more information, see the authentication and authorization page.
Request body
In the request body, supply a Party.GroupMember resource with the following properties:
Property name | Value | Description | Notes |
---|---|---|---|
必填 | |||
members | list | 添加进群的用户列表。列表的元素为用户ID. Example: [“5315959601855”] |
Response
如果请求成功,该API返回该群组的群成员列表数据在响应体信息。
200 Add member to group successfully
{
"data": [
{
"id": 7788,
"user": 3616060330793,
"fullname": "zetong lin",
"first_name": "zetong",
"last_name": "lin",
"status": 300,
"contact_time": "2020-06-10T10:33:25.496694Z",
"expertise": "弹钢琴",
"timezone": "America/New_York",
"timezone_utc_offset": "-04:00",
"location": "USA•New York",
"avatar": "/media/3616060330793/avatar/blob_uB5ZFNh",
"is_removed": false
},
{
"id": 7787,
"user": 7815803339127,
"fullname": "黎 明",
"first_name": "明",
"last_name": "黎",
"status": 300,
"contact_time": "2020-06-10T10:33:25.496694Z",
"expertise": "中式英语",
"timezone": "Asia/Shanghai",
"timezone_utc_offset": "+08:00",
"location": "CHN",
"avatar": "/media/7815803339127/avatar/blob_5BrnPkO",
"is_removed": false
},
{
"id": 7786,
"user": 5315959601855,
"fullname": "Garfield MJ",
"first_name": "Garfield",
"last_name": "MJ",
"status": 300,
"contact_time": "2020-06-10T10:33:25.496694Z",
"expertise": "游泳",
"timezone": "Asia/Shanghai",
"timezone_utc_offset": "+08:00",
"location": "CHN",
"avatar": "/media/5315959601855/avatar/blob",
"is_removed": false
},
{
"id": 7785,
"user": 7815769374283,
"fullname": "WenWei Yang",
"first_name": "WenWei",
"last_name": "Yang",
"status": 300,
"contact_time": "2020-06-10T10:33:25.496694Z",
"expertise": "P2P专家",
"timezone": "America/New_York",
"timezone_utc_offset": "-04:00",
"location": "USA•New York",
"avatar": "/media/7815769374283/avatar/blob_Pb0mraD",
"is_removed": false
}
]
}
404 Not found
示例返回数据可参考 API Common – Resource Not Found