接口说明
- 账户信息请联系安我基因的商务
- 请求方式:POST
- 接口地址:/api-auth/oauth/token
Request
| 参数名 |
数据类型 |
描述 |
是否必传 |
| appId |
String |
用户名(安我基因提供) |
是 |
| appSecret |
String |
密码(安我基因提供) |
是 |
Response
| 参数名 |
数据类型 |
描述 |
| code |
int |
状态码(只有状态码是 0 时,接口响应的数据是成功返回) |
| msg |
String |
接口相应接口描述(只有状态描述是”OK”才是响应接口成 功,其他都是响应失败的文字描述) |
| result |
Object |
接口请求成功之后的返回数据具体看参考 result 说明 |
Result(响应数据结果说明)
| 参数名 |
数据类型 |
描述 |
| expires_in |
int |
token 有效时间(7200 秒/2 小时) |
| token |
String |
账户信息加密后的的字符串,在调用安我基因的接口统一 的必传参数 |
接口请求的示例
URL
curl d "appId=xxx&appSecret=yyy"https://devopensapi.andall.com/api-auth/oauth/token -X POST -
Response
{ "code": 0, "msg": "OK", "result": { " expires_in ": 7200, "token": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJ6b21hX3BsYXRmb3JtX3VzZXIiLCJleHAiOjE1OTcx MTUxMTUsInVzZXJuYW1lIjoiZGc5MUhXR0xvZEhod09zQiJ9.fLbmLYuew- HNW8QFbrlGt3TLMXAbwGU3so5_qYq7vlI" }}