Developer Platform

Tuya MiniApp Developer Platform streamlines the management of your miniapps and supports a full range of features. For example, you can manage miniapp versions, test miniapps after QR code scanning, manage permissions, and configure multilingual options. You can go to the Statistics module of a specific miniapp to get more insights into business data and optimize the miniapp.

You must register an account of the Tuya Developer Platform and use this account to log in to the Tuya MiniApp Developer Platform before you can create a miniapp.

Miniapp list and management pages

Tuya MiniApp Developer Platform consists of the miniapp list and management pages for a specific miniapp.

  • Miniapp list: Create a miniapp and check existing miniapps on this list.
  • Management pages: Support management operations for a specific miniapp. For example, configure the miniapp, submit a version for review, and release this version.

Create a miniapp

On the miniapp list, click Create. Then, set the name, logo, type, and other required information about the miniapp, and click OK.

One or more miniapps can be created for each developer account. Each miniapp is automatically assigned a unique miniapp ID when it is created. During subsequent development in Tuya MiniApp Tool, this miniapp ID will be used to link the miniapp with the project and upload the miniapp to the cloud. You can go to the Development module of a specific miniapp to check its miniapp ID.

After a miniapp is created, its name and logo can be modified in the Basic Settings module, but the miniapp type cannot be changed.

Versions

In the Versions module, you can get the trial QR code of a miniapp version. You can also submit this version for review, and start the approved version to make it generally available or pause this version to make it unavailable.

The miniapp version that is uploaded from Tuya MiniApp IDE appears at Tuya MiniApp Developer Platform > Version > Dev Version.

You can set this version to a trial version, and scan its trial QR code to test this version. Before the test, the test account must be added to the allowlist in the Allowlist module. For more information, see the Trial QR code section below in this topic.

After the development version is submitted for review, it will be moved to the Review Version tab. The version will be automatically approved one or two minutes later if it is submitted by an internal developer.

The approved version is moved to the Official Version tab, where you can start or pause this version.

Version typeDescriptionAvailable button
Development versionEach uploaded version is an independent development version.Submit for Review, Delete
Trial version(Optional) Before an official version becomes generally available, you can set this version to a trial version and allow authorized members to test this version.Set as trial version
Review versionA development version is submitted for review and becomes this version. If a version does not pass the review, the version needs to be returned for modification based on the reason for rejection.Available button vary, depending on different review states:
- Reviewing: Withdraw
- Passed: Request Release
- Rejected: Withdraw
Official versionThe released official version is generally available to all users.Start, Pause

Trial QR code

The app account must be allowlisted before it can be used to test a miniapp. The allowlisted app account can be used to scan a trial QR code and open the respective miniapp version for trial. If the app account is not allowlisted, after QR code scanning, only the latest miniapp version that is generally available can be started.

Therefore, before QR code scanning, add the test account to the allowlist. This enables the target trial version to be started.

To allowlist an app account, perform the following steps:

  1. Go to the Distribution module of the miniapp, and configure the target app and data centers to which the miniapp will be distributed.
  2. Go to the Allowlist module, and add the test account.
  3. Go to the Versions module, and use the target app to scan the trial QR code of the miniapp version.

Step 1: Configure distribution

In Distribution, you can specify the apps that can wake up the current miniapp. Configure the target app and data centers to which the miniapp will be distributed.

You are expected to select an OEM app that is created with the current account of the Tuya Developer Platform.

Step 2: Configure allowlist

Go to Allowlist > App Accounts, click Add. In the dialog box that appears, configure the test app and account information. You are expected to choose among the SmartLife app by default and the target apps configured in Distribution.

Step 3: Scan QR code and test

Go to the Versions module, find the target trial version, and then click Set as Trial Version to specify this version as a trial version. Then, click Trial QR Code next to the version.

In the dialog box that appears, you can set the page path and device ID to be opened after QR code scanning. You can also keep the default settings to enable access to the homepage. Then, use the target app to scan the trial QR code and test the miniapp version.

Test panel miniapp

When you configure the allowlist for testing a panel miniapp, you can skip the configuration of distribution. Instead, go to Allowlist, and specify the SmartLife app or an OEM app.

When you configure the trial QR code for testing a panel miniapp, you must enter the virtual device ID or real device ID. This way, the system can retrieve the test device information.

For more information about how to get the device ID, see Panel Miniapp > Quick Start > Get deviceId.

To specify a real device ID, the device must have been added to the test app account or included in a device group of the app account.

Error messages

After the trial QR code is scanned, if any of the following error messages are returned:

  • "The miniapp is not linked with the app": You need to specify the app as the target app to which the miniapp will be distributed.

  • "No permission to this version": You need to add the app account to the allowlist.

Manage permissions

Access to miniapps is controlled through the Authorizations feature on the Tuya Developer Platform. Only the space owner, developer, or administrator is permitted to manage the miniapp project within this space.

If you are the space owner, you can add an account and assign it the role of developer or administrator on the Tuya Developer Platform to manage your miniapp.

To join another space, request the space owner to add you as an administrator or developer, and then switch to that space.

Submit for review and release

Your miniapps must meet security compliance requirements. Tuya performs security checks for the target domain names and request paths for the miniapps.

To make API requests or load static resources, you must configure respective domain names in the Development module.

For more information, see Compliance Requirements.

Target APIConfigured At
ty.request()Tuya MiniApp Developer Platform > Development > Server Domain Names Across Data Centers
ty.uploadFile()Tuya MiniApp Developer Platform > Development > Server Domain Names Across Data Centers
ty.downloadFile()Tuya MiniApp Developer Platform > Development > Server Domain Names Across Data Centers
Static resourcesTuya MiniApp Developer Platform > Development > Static Resources Across Data Centers