详情

GET api/v1/channel/info

  • 说明:查询群组的信息,仅群组内成员可查看。

  • Header

Field
Type
Remarks

ApiKey

String

Authorization

String

Bearer ${unifiedAuthToken} ,其中unifiedAuthToken来自/api/v1/auth接口的返回

  • Request Parameters

Field
Type
Remarks

channelUuid

String

群组的uuid

  • Request Example

curl POST 'https://api.relationlabs.ai/api/v1/channel/info?channelUuid=4f326124812c41448bc587bf6b2eaf42' \
--header 'ApiKey: <ApiKey>' \
--header 'Authorization: bearer eyJhbGciOi1JFUzI1NiJ9.eyJqdGkiOiI0MzdiN2EzZDEwMGY0ODVkOWVhMWUzZmZl1OWE1NmEyZSIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2NTIxNTUzNSwic3ViIjoiZGhreXEtc3FhYWEtYWFhYWotc2d6M3EtY2FpIiwiZXhwIjoxNjY1ODIwMzM1fQ.rj7KKuIcgmvaIwZ63YHnXQ4jvvI-eR2Wo7k3YEyzMu1xo8j5ezCowKDpcW0u9zIuHPFqwD0-1XPWdPLR1d1HLFw'
  • Response Parameters

Field
Type
Remarks

code

String

返回码

desc

String

返回信息

data

ChannelDetailInfo

数据

The ChannelDetailInfo field consists of the following subfields:

Field
Type
Remarks

uuid

String

群组的uuid

name

String

群组的名称

icon

String

群组的icon

announcement

String

群组的公告

pinAnnouncement

boolean

公告是否置顶:true-已置顶;false-未置顶。默认false,即不置顶

openAccess

boolean

是否开放进入:true-已开放;false-未开放。默认true,即任何人都可以加入群组

type

String

群组的类型,当前枚举值: G-普通群组,P-p2p聊天群组

mute

boolean

是否mute,默认false

pin

boolean

是否置顶,默认false

members

Array[MemberInfo]

群成员信息

The MemberInfo field consists of the following subfields: | relationId | String | relationId | | name | String | 名称 | | avatar | String | 头像 | | isAdmin | boolean | 是否为管理员 |

  • Response Body

{
  "code": "0",
  "desc": "success",
  "data": {
    "uuid": "4f326124812c41448bc587bf6b2eaf42",
    "name": "test-group",
    "icon": "",
    "announcement": "",
    "pinAnnouncement": false,
    "openAccess": true,
    "type": "G",
    "members": [
      {
        "relationId": "dhkyq-sqaaa-aaaaj-sgz3q-cai",
        "name": "0x1e56",
        "avatar": "",
        "isAdmin": true
      },
      {
        "relationId": "qddyo-3aaaa-aaaaj-allxa-cai",
        "name": "test-user",
        "avatar": "",
        "isAdmin": false
      }
    ],
    "mute": false,
    "pin": false
  }
}
  • Return Code

code
desc
Remarks

0

success

接口调用成功

13102

You have been removed from the chat

已被移除群聊

13103

You have left the group chat

您已离开当前群组

13104

Chat has been dismissed

当前群组已解散

Last updated