Generate Device Distribution Network token

Feature Description

Generate device distribution network token

Interface Address

POST /v1.0/devices/token

Header Parameter

Parameter name Type Parameter position Description Required
client_id String header client_id Yes
access_token String header Access token for obtaining token-related interface Yes
sign String header Signature calculated by the “after get token” signature algorithm Yes
sign_method String header Digestion algorithm of signature, HMAC-SHA256 Yes
t Long header 13-digit standard time stamp Yes
Content-Type String header Content Type,default “application/json” Yes

Request Parameters

Parameter name Type Parameter position Description Required
uid String body Unique user identifier Yes
timeZoneId String body User's current timezone id, State / Province (Asia/Shanghai) Yes
lon String body Longitude No
lat String body Latitude No
lang String body System language, zh,eu, etc. Default zh No

Request Example

POST /v1.0/devices/token

Return Messages

Parameter name Type Description
code Integer Response code(see error code section for details)
success Boolean Success or failed: (true: success, false: failed)
msg String Request failed message. Empty when successful
result Object Return results

Result Description

Parameter name Type Description
region String Currently available region. Currently supports: AY EU US
token String Network distribution token
secret String Key

Note: It should be noted that when using Tuya network distribution sdk, assembling result parameter is required: region+token+secret is for initialization. example:

{
"success": true,
"result": {
"secret": "usyA",
"region": "AY",
"token": "BBaF10SS"
}
}

the sdk`s token=AYBBaF10SSusyA

400 Call

Consult

400-881-8611