Query Pairing Result

Last Updated on : 2023-11-23 06:54:26download

Based on the pairing token, query the pairing result.

API address

GET: /v2.0/cloud/thing/active/token/{token}

Request parameter

Parameter nameTypeINRequiredDescription
tokenStringpathtrueThe pairing token.

Return parameter

Parameter nameTypeDescription
resultDeviceActiveResThe list of returned data.
successBooleanIndicates whether the operation is successful. Valid values:
  • true: The operation succeeded.
  • false: The operation failed.
tLongThe timestamp.
tidStringThe link ID.

Description of result

Parameter nameTypeDescription
successDevicesListThe list of paired devices.
errorDevicesListThe list of devices failed in pairing.

Description of errorDevices

Parameter nameTypeDescription
idStringThe device ID.
nameStringThe device name.
errorCodeStringThe error code returned on failure.
errorMsgStringThe error message.

Description of successDevices

Parameter nameTypeDescription
idStringThe device ID.
nameStringThe device name.
productIdStringThe product ID.
lonStringThe longitude.
latStringThe latitude.
ipStringThe IP address of the specified device.
onlineBooleanIndicates whether the device is online.
uuidStringThe universally unique identifier (UUID) of the specified device.

Request example

GET: /v2.0/cloud/thing/active/token/AG******

Return example

{
    "tid": "b8a2b49abbbc11eda71e169efc83a172",
    "result": {
        "successDevices": [
            {
                "productId": "ngarn****",
                "ip": "0.0.0.0",
                "lon": "0",
                "uuid": "drdz05cce7**********",
                "name": "Device name",
                "online": true,
                "id": "vdevo163815529739***",
                "lat": "0"
            }
        ],
        "errorDevices": [
            {
                "errorCode": "2001",
                "errorMsg": "device is offline",
                "name": "Device name",
                "id": "vdevo163815529739***"
            }
        ]
    },
    "t": 1678065474602,
    "success": true
}

Error code

For more information, see error code.