Skip to main content

Create Group

Create group


POST /api/groups/

Request Headers

fieldRequiredheaders Descriptionexample
web3mq-request-pubkeyYesyour login keyapir's public key59daabd77706ba02a97c523513a2ceaed10e4275bd6
didkeyYesyour did_type + ":" + did_valueeth:0xa1b1233fdfde

Request Payload

Parameters in bodyTypeRequiredParameters Description
useridstringYesuserid
group_namestringNogroup name
timestampintYestimestamp milliseconds
avatar_urlstringNoavatar_url
avatar_base64stringNoavatar_base64
web3mq_signaturestringYesuse ed25519 base64 encode signature see signing detail

web3mq_signature signing rule

base64 encode signature

web3mq_signature = ed25519 private key signing(userid + timestamp)

body params

{
"userid": "your userid",
"group_name": "group_name",
"web3mq_signature": "web3mq_signature",
"avatar_url": "avatar_url",
"avatar_base64": "",
"timestamp": 1656991509327
}

response

ParametersTypeAlways ReturnParameters Description
codeintYesresult code, 0 means success, other code see msg's contents
msgstringYesresult description
datadictYesreturn includes response info
{
"code": 0,
"msg": "ok",
"data": {
"groupid": "groupid",
"avatar_url": "avatar_url",
"group_name": "group_name"
}
}