All Products
Search
Document Center

Marketplace:API list

Last Updated:Mar 25, 2025

Important

DISCLAIMER

Please note that all content presented on this page is provided by Tuya (HK) Limited. Alibaba Cloud makes no representations and warranties, explicit or implied, as to the authenticity or accuracy of any such content, nor makes any guarantee to the condition, quality, durability, performance, reliability, merchantability or fitness for a particular purpose, or non-infringement of any products and/or services made available by Tuya (HK) Limited. 

User Login

Allows authorized users to update their own information through this interface.

  • URL : POST:/v1.0/openapi/visual/d/user/login

  • Method : POST

  • Login required : yes

  • Authentication required : yes

Request Parameters

Parameters

Type

Description

UserName

String

Developer account name

Password

String

Developer Password

DeviceList

List <Object>

List of devices requiring authorization

DeviceInfo

Object

Device Object

ProductKey

String

Device Product Key

DeviceName

String

Equipment Name

Request Example

{
    "userName": "userName",		// 开发者账户名
    "password": "password",		// 开发者密码
    "deviceList": [				// 需要授权的设备列表
        {
            "productKey": "wkNCAsnnlsYSnI6n",	// 设备产品Key
            "deviceName": "2ac4d7cffa"			// 设备名称
        }
    ]
}

Successful Response

  • Condition : The request parameters are valid and the user identity verification passes.

  • Status code: 200 OK

Parameters

Type

Description

Success

Boolean

Request Result Status

Msg

String

Error message

T

Long

Request Time

Data

Object

Result Object

DeviceVisualTokenList

List <Object>

Object Collection

ProductKey

String

Device Product Key

DeviceName

String

Equipment Name

VisualToken

String

Device token information

Expire

Integer

Expiration Time (seconds)

Response Example

{
    "success": true,
    "msg": null,
    "t": 1737621418759,
    "data": {
        "deviceVisualTokenList": [
            {
                "productKey": "wkNCAsnnlsYSnI6n",	// 设备产品Key
                "deviceName": "2ac4d7cffa",			// 设备名称
                "visualToken": "eyJhbGciNiJ9.xxx.5f5Nd5JNaP-O2LBmYJZO0_9thFU",
            	  "expire": 3600						// 过期时间,单位秒。
            }
        ]
    }
}

Precautions

The visualToken is the unique access credential for each device.