跳到主要内容

社区信息

GEThttps://open.debox.pro/openapi/group/info

获取当前群组信息,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......"  \
"https://open.debox.pro/openapi/group/info?\
group_invite_url=https://m.debox.pro/group?id=fxi3hqo5"

Parameters

app_id : String 应用唯一标识,在DeBox开放平台申请

X-API-KEY : String 开发者 API Key,在DeBox开放平台获取

nonce : String 随机数字,长度 8 位

timestamp : String 时间戳,精确到毫秒

signature : String 签名,需严格按照下方的签名计算规则计算

  • 签名计算规则:
    // 顺序必须必须严格按:appsecret -> nonce -> timestamp
    signature = SHA1({appsecret}{nonce}{timestamp})
  • 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名
  • appsecret: 开发者 App Secret,在DeBox开放平台获取
Query

group_invite_url : 群组分享 url,在 app 端,点击群分享,复制链接即可获得

Responses

200: OK
# is_charge 检查是否为PayEClub
# subchannel_number 子频道数量
# group_name 群组名称
# group_number 群组人数
# group_pic 群封面图
# create_time 创建时间
# maximum 最大群组人数上限
# mod MOD名称
{
"code": 200,
"data": {
"is_charge": true,
"subchannel_number": 3,
"group_name": "aaa",
"group_number": 29,
"group_pic": "https://data.debox.pro/static/2022/09/19/static/2022/09/19/100009_1435000131.jpg",
"create_time": "2022-04-30 16:03:24",
"maximum": "500",
"mod_info":[{"name":"ChatBot","wallet_address":"0xb63219a8e0d367d87ba1c8b0736cbfdbf2cd459f","avatar":"https://data.debox.pro/static/2024/03/29/uvg2p6ho/1711724284264837135.jpeg","uid":"uvg2p6ho"}]
},
"message": "success",
"success": true
}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}

GEThttps://open.debox.pro/openapi/group/is_join

验证用户是否加入了某群组,使用示例:

curl -X GET -H "X-API-KEY: t2XAlEF6......" \
"https://open.debox.pro/openapi/group/is_join?\
walletAddress=0x2267......&url=https://m.debox.pro/group?id=fxi3hqo5"

Parameters

Header

app_id : String 应用唯一标识,在DeBox开放平台申请

X-API-KEY : String 开发者 API Key,在DeBox开放平台获取

nonce : String 随机数字,长度 8 位

timestamp : String 时间戳,精确到毫秒

signature : String 签名,需严格按照下方的签名计算规则计算

  • 签名计算规则:
    // 顺序必须必须严格按:appsecret -> nonce -> timestamp
    signature = SHA1({appsecret}{nonce}{timestamp})
  • 签名计算需要用与 X-API-KEY 对应的开发者 App Secret 对随机数和时间戳进行签名
  • appsecret: 开发者 App Secret,在DeBox开放平台获取
Query

walletAddress : 钱包地址,代表要验证的用户

url : 群组分享URL ,代表某个群,在群组聊天页面,点击右上角的分享,点击“复制链接”获得

chain_id : 区块链网络ID,默认值1,以太坊主网

Responses

200: OK
{"case3701":false}
400: Bad Request
{"error":"Bad Request","code":400,"message":"You X-API-KEY is not available"}
401: Unauthorized
{"error":"Bad Request","code":401,"message":"Param error"}