Skip to main content
← Back to tutorialsGuide

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.

BeginnerAuthorization

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

  1. Open tyutool and switch to the Authorize tab.
  2. Select your target chip — tyutool applies the correct serial settings automatically.
  3. Select the authorization serial port.
  4. Paste the UUID and AuthKey.
  5. 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>

Full flashing & authorization guide

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

Do I need to re-write the key every time I update the firmware?

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.

Authorization fails or times out

Make sure you selected the authorization/flash port (not the log port), and that no serial monitor is holding the port, then retry.

Device flashed but won’t connect to the cloud

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.

Already-flashed device that only needs a license

Use the auth-only "other" chip option in tyutool — it writes the key without re-flashing firmware.