Skip to main content

Create DApp

POST /api/create_dapp/

Request Headers

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

Request Payload

Parameters in Body jsonTypeRequiredParameters Description
creator_idstringYesuserid
dapp_idstringYesdapp_id
dapp_namestringYesWeb3MQ chat service
dapp_descriptionstringYesWeb3MQ chat dapp
dapp_typestringYesim or other type
dapp_pubkeystringYesdapp ed25519 pubkey
domainstringNodapp deploy domain
timestampintYestimestamp milliseconds
web3mq_user_signaturestringYesuse creator ed25519 private key signing ( base64 encode ) see signing detail

web3mq_signature signing rule

base64 encode signature

web3mq_user_signature = ed25519 private key signing(creator_id + dapp_id + dapp_type + dapp_name + dapp_pubkey + [domain] + timestamp)

Body json params

{
"creator_id": "userid",
"dapp_id": "web3mq:im",
"dapp_type": "im",
"domain": "www.yourdomain.com", //
"dapp_name": "Web3mqIM",
"dapp_description": "Web3mq is a chat service dapp",
"dapp_pubkey": "<ed25519 pubkey>",
"timestamp": 1632432434,
"web3mq_user_signature": "web3mq_user_signature"
}

response

ParametersTypeAlways ReturnParameters Description
codeintYesresult code, 0 means success, other code see msg's contents
msgstringYesresult description
{
"code": 0,
"msg": "ok"
}