Create
POST api/v1/channel/create
Note: This is to creat a group chat. There are two group types: regular and peer-to-peer. With a regular group chat, there can exist an admin and multiple members. With a peer-to-peer group chat, there exists only two members, and you cannot add or remove members.
Header
ApiKey
String
Authorization
String
Bearer ${unifiedAuthToken} , in which the unifiedAuthToken is returned by /api/v1/auth
Request Parameters
name
String
name of the group chat
type
String
Group Chat Type, enumerated as: G-Regular Group Chat, P-p2p Group Chat
members
Array[String]
The collection of group members' relationId. If type=P, then it will only see the caller and the first user as group chat members. The admin of the group chat is the current caller.
Request Example
Response Parameters
code
String
the Return Code
desc
String
the Return Message
data
CreateChannelResponse
the data
The CreateChannelResponse field consists of the following subfields:
channelUuid
String
the uuid of the group chat
Response Body
Return Code
0
success
the flag for a successful request
13101
group type error
Cannot recognize the group type
Last updated