接口说明

使用规范

应用接入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&timestamp=1560668764&sign=4124bc0a9335c27f086f24ba207a4912&phone=18888888888

接口响应

接口响应内容为 JSON 格式。

公共响应参数

字段名 变量名 必填 类型 示例值 描述
状态码 code Int 10000 查看全局状态码
状态描述 msg String(256) Successful 状态码的简单描述
数据 data Object {"userId":"12345","phone":"18888888888"} 接口返回的详细数据

响应示例

{"code":10000,"msg":"成功","data":{"userId":"12345","phone":"18888888888"}}