获取token

请求URL:

POST/vcs_api/openapi/getToken.php

参数:

参数名 是否必须 类型 说明
access string 公司账号
pass string 公司密码

请求示例:

Accept: application/json
Content-Type: application/josn;charset=utf-8
{
    "access": "xxx",
    "pass": "xxx"
}

返回示例:

正确时返回:

{
    "info": "获取成功",
    "code": 0,
    "data": {
        "access_token": "xxxxxxxxxxxxxxxx",
        "expires_in": 7200
    }
}

错误时返回:

{
    "code": "1",
    "info": "公司账号错误"
}

返回参数说明:

参数名 类型 说明
code string 返回码,0为正常,非0为请求失败
info string 接口请求中文说明
data array 返回的数据集
∟ access_token string toekn
∟ expires_in int token有效周期 单位“秒”

备注:

  • 更多返回错误代码请看首页的错误代码描述