Last Updated on : 2023-12-07 03:02:50
This topic describes the request methods, endpoints, and request parameters that are used in API operations of the Cloud Development Platform.
The API operations of the Cloud Development Platform support the following request methods.
Method | Description |
---|---|
GET | Requests the server to return specified resources. |
PUT | Requests the server to update specified resources. |
POST | Requires the server to perform specified operations. |
DELETE | Requires the server to delete specified resources. |
Note: When the request method POST is used, the
Content-Type
parameter must be set toapplication/json
.
The Cloud Development Platform provides a separate endpoint in a different region. You can select an endpoint of the region where your device is deployed. This allows you to reduce the response time of API requests.
Region | Endpoint |
---|---|
Mainland China | https://openapi.tuyacn.com |
America | https://openapi.tuyaus.com |
Europe | https://openapi.tuyaeu.com |
India | https://openapi.tuyain.com |
The following table lists common request parameters that are used in the API operations of the Cloud Development Platform. You must set the values of the required parameters in the request headers.
Parameter | Type | Location | Required | Description |
---|---|---|---|---|
client_id |
String |
header | Yes | The user ID. |
sign | String | header | Yes | The signature that is generated by a specified signature algorithm. |
sign_method | String | header | Yes | The signature digest algorithm. Set the value to HMAC-SHA256. |
t | Long | header | Yes | The 13-digit standard timestamp. |
access_token | String | header | Yes | The information of the token.Note: This parameter is not required when you make API requests to get or refresh tokens. |
lang | String | header | No | The type of language. Set the value to zh for the service that is deployed in mainland China and set the value to en for the service that is deployed in other he regions outside China region. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback