1. 接口信息
1.1. 调用地址
https://api.regenai.com/v1/user/get_user_info
1.2. 请求方式
GET/POST
1.3. 返回类型
JSON
2. 请求参数
名称 |
变量名 |
必填 |
类型 |
示例值 |
描述 |
Key |
app_key |
true |
String(32) |
c5ed72329fece2fe0010a437505b01cb |
分配的key |
令牌 |
token |
true |
String(32) |
7007bd1257dce8d47489166a7c77a926 |
授权令牌 |
时间戳 |
timestamp |
true |
String(32) |
1522374165 |
timestamp 为January 1 1970 00:00:00 GMT 到现在的秒数 |
开始时间 |
start_time |
false |
String(32) |
1551394030 |
start_time 为January 1 1970 00:00:00 GMT 到现在的秒数 |
结束时间 |
end_time |
false |
String(32) |
1569931200 |
start_time 为January 1 1970 00:00:00 GMT 到现在的秒数 |
2.1. 参数说明
- token 的值计算方式为:
md5($appkey+$timestamp+$appSecret)
token=md5("c5ed72329fece2fe0010a437505b01cb+1522374165+5c9597f3c8245907ea71a89d9d39d08e")=7007bd1257dce8d47489166a7c77a926
- API请求示例:
https://fapiao.glority.cn/v1/user/get_user_info?app_key=c5ed72329fece2fe0010a437505b01cb×tamp=1522374165&token=7007bd1257dce8d47489166a7c77a926
- 生成token时,字符串连接中的“+”是必需的,缺少这个符号会无法验证通过验证
3. 返回值
3.1. 正确返回参数
名称 |
变量名 |
必填 |
类型 |
示例值 |
描述 |
返回状态码 |
result |
true |
int |
0或1 |
请求状态. 1:成功, 0:失败 |
回复 |
response |
true |
json |
|
|
3.2. 正确返回样例
{
'result': 1,
'response': {
'user_info': {
'app_key': 'c5ed72329fece2fe0010a437505b01cb',
'big_usage': '9609', --大票已使用次数
'small_usage': '8288', --小票已使用次数
'quota_usage': '11850', --定额已使用次数
'sync_validation_usage': '21', --同步验真已使用次数
'async_validation_usage': '2', --异步验真已使用次数
'fetch_usage':'2' --取数已使用次数
}
}
}
3.3. 错误返回参数
名称 |
变量名 |
必填 |
类型 |
示例值 |
描述 |
返回状态码 |
result |
true |
int |
0或1 |
请求状态. 1:成功, 0:失败 |
错误码 |
error |
true |
int |
10002 |
|
信息说明 |
message |
true |
String |
"Autdenticate failed" |
|
3.4. 错误返回样例
{
'result': 0,
'error': 10002,
'message': 'Authenticate failed'
}