Use your license key
A TuyaOpen license key is a UUID + AuthKey pair. This guide shows how to write it to a device and verify it, so the device can connect to the Tuya Cloud.
What a license key is
Every TuyaOpen device that connects to the Tuya Cloud needs one license key — a UUID (identity) and an AuthKey (secret), written to the device over the same UART you flash with.
- One key authorizes one device. Keys are not reusable across devices.
- TuyaOpen and TuyaOS keys are not interchangeable — use a TuyaOpen key.
- A key is separate from firmware: you can re-flash firmware without re-writing the key.
Get a key
You can get a free trial key for evaluation, or buy keys in bulk for production. See the licensing page for options and pricing.
Get a license keyTuya Developer Platform →
Have your UUID and AuthKey ready before you start — you will paste them into tyutool.
Write the key to a device
The easiest way is tyutool. Connect the board over USB, then use the GUI or the CLI.
With the tyutool GUI
- Open tyutool and switch to the Authorize tab.
- Select your target chip — tyutool applies the correct serial settings automatically.
- Select the authorization serial port.
- Paste the UUID and AuthKey.
- Click Start authorization, then read back the state to confirm.
With the CLI
Same operation from a terminal:
# Read the current authorization state
tyutool authorize -p /dev/ttyUSB0
# Write a new UUID + AuthKey (both required)
tyutool authorize -p /dev/ttyUSB0 \
--uuid <UUID> --authkey <AUTHKEY>Verify it worked
Confirm the key is stored, then check the device activates against the cloud.
- Read the authorization state back (GUI read-back, or the CLI read command above) and confirm the UUID matches.
- Reboot the device and watch the serial log — a successful activation reports the device coming online.
- Pair the device in the Tuya app; it activates against the cloud using the written credentials.
Troubleshooting
No. The key is stored in the device’s KV storage and survives firmware re-flashes — you only need to write it again after a full chip erase.
Make sure you selected the authorization/flash port (not the log port), and that no serial monitor is holding the port, then retry.
The firmware is flashed but no key was written, or the wrong key type was used. Re-check that a TuyaOpen (not TuyaOS) UUID + AuthKey is stored.
Use the auth-only "other" chip option in tyutool — it writes the key without re-flashing firmware.