Manage API Services

Last Updated on : 2023-08-25 06:41:53download

Tuya IoT Development Platform opens up a variety of API services to meet different requirements. For example, the following services can be implemented: smart home management, industry general device and user management, open capabilities of vertical categories, and various data services. This topic describes how to subscribe to API services and authorize projects to call API operations.

Some API calls require access to users’ personal data. Therefore, you are obliged to formulate a personal data privacy statement in accordance with your local laws or regulations and take adequate measures to ensure that users’ privacy is fully protected.

Subscribe to APIs

Subscribe to the desired APIs. For more information about APIs, see Cloud Services API Reference.

Method 1: Subscribe automatically

During the project creation process, certain API services that support the specified development method are selected on the Tuya IoT Development Platform by default. For more information, see the section Create a project in Manage Projects.

Method 2: Free trial

  1. Log in to the Tuya IoT Development Platform.

  2. Choose Cloud > Cloud Services.

  3. On the My Service page, search for and subscribe to your desired cloud services.

  4. On the page of My Service, click Free Trial.

    Manage API Services
  5. On the Free Trial page, click Continue to subscribe to the services.

Method 3: Subscribe to an official edition

After you try out and debug the APIs, you can subscribe to a resource pack to enjoy more services.

  1. Choose Cloud > Cloud Services.

  2. On the My Service page, search for and subscribe to official cloud services that require a paid subscription.

    Take IoT Core for example. Click Subscribe to Resource Pack on the details page of the specific service, and select the desired edition.

    Manage API Services
  3. On the product details page (such as IoT Core), select the API service edition that you want to subscribe to, and click Buy Now.

View API service details

On the details page of API services, you can find My Subscriptions, API List, and Authorized Projects.

  1. Log in to the Tuya IoT Development Platform.

  2. Choose Cloud > Cloud Services.

  3. On the My Service page, search for and subscribe to your desired cloud services.

    Manage API Services
  4. Click View Details in the Operation column to enter the details page. You can find My Subscriptions, API List, and Authorized Projects of the specified cloud service.

    For more information about Tuya’s open APIs, see Cloud Services API Reference.

Grant a project access to API calls

Tuya provides two methods to help you manage APIs and project authorization.

Method 1: Add cloud service authorization under a project

  1. Go to Cloud > Development, select a project, and click Open Project in the Operation column to enter the details page.

  2. Select the Service API tab and click Go to Authorize.

  3. Select the cloud service as you want and authorize the project to access this cloud service.

    Manage API Services
  4. Click OK to complete authorization.

Method 2: Add cloud project authorization under a cloud service

  1. On the page of Cloud Services, select an API service and click View Details in the Operation column.

  2. Select the Authorized Projects tab and click Add Authorization.

    Manage API Services
  3. On the API Authorization page, select one or more cloud projects to be authorized.

  4. Click Confirm Authorization to complete authorization.