创建网络用户
POST /users
创建一个 Network User, Network User 是机器人下面的子帐号,API 使用有限制,只能对资产进行操作,比如充值,转帐,提现。没有办法像 Messenger User 那样聊天。
API 端点 URL
https://api.mixin.one/users
请求体
{
// Ed25519 Public Key in Base64
"session_secret": 'Ed25519 Public Key in Base64'
// display name
"full_name": 'A name'
}
请求示例
curl -i -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" https://api.mixin.one/users -data '{"full_name": "Bot User","session_secret": SECRET}'
Response
{
"data":{
"user_id": "06aed1e3-bd77-4a59-991a-5bb5ae6fbb09", // User Id
"session_id": "a34c07a9-755d-4b54-94c5-e45e9a2dd43e", // Session Id
"pin_token": "", // PIN
"full_name": "Bot User", // Nickname
"biography": "", // Brief Intro
"avatar_url": "", // Avatar
"created_at": "2018-05-03T06:03:56.867971412Z", // Creation Timestamp
}
}