使用规范
应用接入API需向NEX申请应用ID和应用秘钥(appId、appSecret)。
接口URL
https://api.nex-i.cn/
接口使用https协议的POST方法,请求 Content-Type: application/x-www-form-urlencoded
接口中包含附件上传的,请求 Content-Type: multipart/form-data
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
应用ID | appid | 是 | String(16) | 6zhZ2jRocZm6opde | NEX下发的应用appId |
版本号 | version | 是 | Int | 1 | Api版本号 |
时间戳 | timestamp | 是 | Int | 1560668764 | 当前时间,unix时间戳(秒) |
签名 | sign | 是 | String(32) | 4124bc0a9335c27f086f24ba207a4912 | 通过签名算法计算得出的签名值,详见签名生成算法 |
POST /user/reg HTTP/1.1 Host: sq-api.ujquan.com Content-Type: application/x-www-form-urlencoded Accept: */* Cache-Control: no-cache Accept-Encoding: gzip, deflate Content-Length: 88 appid=6zhZ2jRocZm6opde&version=1×tamp=1560668764&sign=4124bc0a9335c27f086f24ba207a4912&phone=18888888888
字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
---|---|---|---|---|---|
状态码 | code | 是 | Int | 10000 | 查看全局状态码 |
状态描述 | msg | 是 | String(256) | Successful | 状态码的简单描述 |
数据 | data | 是 | Object | {"userId":"12345","phone":"18888888888"} | 接口返回的详细数据 |