通过token获得用户信息

更新时间:2022-09-29 11:20:41

接口说明

通过token获得用户信息

基本信息

请求方式: GET

请求路径:

https://prod.open-api.mysre.cn/business/user/get-user-info-by-token

请求参数

参数名 参数位置 参数类型 必填 默认值 示例 描述
tenant_code query string
token query string bbd2261814088d5d749982b97589a36797886c1a token

请求示例

/business/user/get-user-info-by-token?tenant_code=retesting&token=bbd2261814088d5d749982b97589a36797886c1a

返回成功示例

{
    "errcode": 0,
    "errMsg": "成功",
    "data": {
        "id": "22b11db4-e907-4f1f-8835-b9daab6e1f23",
        "account": "retesting",
        "name": "超级用户",
        "org_id": "11b11db4-e907-4f1f-8835-b9daab6e1f23",
        "auth_proj_list": [],
        "auth_corp_list": [
            "11b11db4-e907-4f1f-8835-b9daab6e1f23"
        ]
    }
}

返回参数说明(成功)

参数名 参数类型 描述
errcode number
errMsg string
data object
data.id string 用户ID
data.account string 用户账号
data.name string 用户名称
data.org_id string 用户所属组织ID
data.auth_proj_list array 授权的项目ID列表
data.auth_corp_list array 授权的公司ID列表

失败返回示例

{
    "errcode": 1001,
    "errMsg": "token不能为空",
    "data": []
}

返回参数说明(失败)

参数名 参数类型 描述
errcode number 1001一般错误 1009token过期
errMsg string
data array

results matching ""

    No results matching ""