申请帐户数字证书
请求地址:https://baas.qq.com/tpki/tpki.TpkiSrv.AccountApply
TPKI公钥:A+iGe/r2BsdsI+7bJP3yv30eViTwvBkQNs1mWJ/Iootx
业务逻辑:申请帐户数字证书
请求方法:POST
请求字段:
名称 类型 必填 限制 描述 version string 是 length >=1 length <=8 版本号,本版本固定为“1.0” sign_type string 是 length >=1 length <=8 签名算法类型,本版本固定为“ECDSA” mch_id string 是 length >=1 length <=64 通讯方的ID(即BaaS平台中的机构ID,可在【我的账户】中获取) mch_sign string 是 length >=1 length <=256 通讯方签名 chain_id string 是 length >=1 length <=64 链ID user_id string 是 length >=1 length <=64 用户 acc_type int32 是 value >=1 value <=2 帐户类型 acc_pub_key string 是 length >=1 length <=256 帐户公钥 multi_sign_ori message 否 多重签名来源 multi_sign_ori.m int32 否 value >=1 value <=16 M multi_sign_ori.n int32 否 value >=1 value <=16 N multi_sign_ori.user_list message数组 否 用户列表 multi_sign_ori.user_list.user_id string 否 length >=1 length <=64 用户 multi_sign_ori.user_list.public_key string 否 length >=1 length <=256 公钥 timestamp int64 是 value >=0 请求时间戳。当前unix时间戳(秒),与服务器时间相差过远会返回失败 请求示例:
https://baas.qq.com/tpki/tpki.TpkiSrv.AccountApply
{
"version":"1.0",
"sign_type":"ECDSA",
"mch_id":"gb09d6c75da809e9d",
"mch_sign":"sig",
"chain_id":"ch09d6c75in809e9d",
"user_id":"user1",
"acc_type":1,
"acc_pub_key":"accpubkey",
"multi_sign_ori":{
"m":2,
"n":3,
"user_list":[
{
"user_id":"user1",
"public_key":"pubkey1"
}
]
},
"timestamp":0
}
- 应答:
{
"retcode":0,
"retmsg":"ok",
"id":1000011,
"version":"v1.0",
"sign_type":"ECDSA",
"user_id":"user1",
"acc_type":1,
"acc_address":"accaddress",
"acc_pub_key":"accpubkey",
"multi_sign_ori":{
"m":2,
"n":3,
"user_list":[
{
"user_id":"user1",
"public_key":"pubkey1"
}
]
},
"from":"2018-08-01 01:10:20",
"to":"2030-08-01 01:10:20",
"state":1,
"issue":"TrustSQL_CA",
"issue_sign":"sig"
}
- 应答字段解析:
名称 | 类型 | 必填 | 限制 | 描述 |
---|---|---|---|---|
retcode | int32 | 是 | 应答code | |
retmsg | string | 是 | 应答信息 | |
id | int32 | 否 | value >=1 value <=11 | 序列号 |
version | string | 否 | length >=1 length <=8 | 版本号,本版本固定为“1.0” |
sign_type | string | 否 | length >=1 length <=8 | 签名算法类型,本版本固定为“ECDSA” |
user_id | string | 否 | length >=1 length <=64 | 用户 |
acc_type | int32 | 否 | value >=1 value <=2 | 帐户类型(1.普通账户 2.多重签名账号) |
acc_address | string | 否 | length >=1 length <=64 | 帐户地址 |
acc_pub_key | string | 否 | length >=1 length <=256 | 帐户公钥 |
multi_sign_ori | message | 否 | 多重签名来源 | |
multi_sign_ori.m | int32 | 否 | value >=1 value <=16 | M |
multi_sign_ori.n | int32 | 否 | value >=1 value <=16 | N |
multi_sign_ori.user_list | message数组 | 否 | 用户列表 | |
multi_sign_ori.user_list.user_id | string | 否 | length >=1 length <=64 | 用户 |
multi_sign_ori.user_list.public_key | string | 否 | length >=1 length <=256 | 公钥 |
from | string | 否 | length >=1 length <=32 | 有效开始时间 |
to | string | 否 | length >=1 length <=32 | 有效结束时间 |
state | int32 | 否 | value >=1 value <=6 | 状态 1提交认证中 2认证通过 3认证不通过 4冻结 5吊销 6过期 |
issue | string | 否 | length >=1 length <=64 | 签发机构 |
issue_sign | string | 否 | length >=1 length <=256 | 签发机构签名 |
返回顶部