关联用户授权登录

更新时间:2023-06-15 09:49:19

本文介绍关联用户授权登录的 API。

接口描述

关联用户授权登录

接口地址

POST: /v1.0/iot-01/associated-users/actions/authorized-login

请求参数

body 说明

参数名类型参数位置是否必填说明
country_codeString true国家码
usernameString true用户名
passwordString true密码
schemaString trueApp标识

返回参数

参数名类型说明
resultTokenRes

result 说明

参数名类型说明
access_tokenString访问令牌
expire_timeInteger有效时间,单位:秒
refresh_tokenString刷新令牌
uidString涂鸦用户 ID

请求示例

POST: /v1.0/iot-01/associated-users/actions/authorized-login
{
  "username": "188xxxx22",
  "password": "9cbxxxxxxx9a0",
  "country_code": 86,
  "schema": "tuyaSmart"
}

返回示例

{
    "result": {
        "expire_time": 7200,
        "access_token": "48643baf0xxxxx9f8efa",
        "refresh_token": "656adfccxxxxfe43e91bea",
        "uid": "ay15xxxxxxx8Ot"
    },
    "t": 1621909749209,
    "success": true
}

错误码

参考 错误码