Last Updated on : 2025-03-06 06:13:01download
This topic describes the API operations that are used to get a token.
In cloud-to-cloud integration scenarios, you can request cloud API authorizations from the platform in simple mode and implicitly get a token.
Please read these documents carefully before making API requests.
GET: /v1.0/token
Parameter | Type | Parameter location | Required | Description |
---|---|---|---|---|
req | TokenReq | query | true | The API request. |
Description of req
Parameter | Type | Parameter location | Required | Description |
---|---|---|---|---|
grant_type | String | query | true | The authorization type. Valid values:
|
code | String | query | false | The authorization code. It is available only when the value of grant_type is 2 . |
terminal_id | String | query | false | The terminal ID. |
target_uid | String | query | false | The unique identifier of a user authenticated by Identity and Access Management (IAM). The IAM integration is supported only when the value of grant_type is 1 . |
Parameter | Type | Description |
---|---|---|
result | TokenRes | The response result. |
Description of result
Parameter | Type | Description |
---|---|---|
access_token | String | The access token. |
expire_time | Integer | The validity period in seconds. |
refresh_token | String | The refresh token. |
uid | String | Tuya user ID. |
GET: /v1.0/token?grant_type=1
{
"expire_time": 7200,
"access_token": "**",
"uid": "eu*****",
"refresh_token": "**"
}
For more information, see Global Error Codes.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback