获取用户上下文

更新时间:2021-05-13 17:54:18

接口说明

使用授权码换取用户上下文

基本信息

请求方式: POST

请求路径:

https://prod.open-api.mysre.cn/openapi/auth/user

请求参数

参数名 参数位置 参数类型 必填 默认值 示例 描述
auth_code body string 授权码

请求示例

{
    "auth_code": "b48b8f8ddb410228fb9fba37db7e94f4a5ff33b2",
}

返回成功示例

{
    "errcode": 0,
    "errmsg": "ok",
    "data": {
        "dev_id": "54bdece2-fd80-46c2-b2a5-d496836ab9c9",
        "tenant_id": "my570cd49bc2458",
        "user_id": "502"
    }
}

返回参数说明(成功)

参数名 参数类型 描述
errcode number
errmsg string
data object
data.dev_id string
data.tenant_id string
data.user_id string

失败返回示例

{
  "request_id": "39f77896-29a0-7669-46d1-68b0bc28cfee",
  "errcode": 1,
  "errmsg": "xxx",
  "data": []
}

返回参数说明(失败)

参数名 参数类型 描述
request_id string 请求ID
errcode number 错误码
errmsg string 错误信息
data array 返回数据集

results matching ""

    No results matching ""