Last Updated on : 2024-09-10 08:48:30
In the cloud-to-cloud integration scenarios, you can request cloud API authorizations from the platform in simple mode and get a token implicitly.
Please read these documents carefully before making API requests.
Quick Start
API Sample Request
GET: /v1.0/token
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
req | TokenReq | query | true | The API request. |
Description of req
Parameter name | Type | IN | Required | Description |
---|---|---|---|---|
grant_type | String | true | The authorization type. Valid values:
|
|
code | String | false | The authorization code. This parameter is supported only when grant_type is 2 . |
|
terminal_id | String | false | The terminal ID. | |
target_uid | String | false | The unique identifier of a user authenticated by Identity and Access Management (IAM). The IAM integration is supported only when grant_type is 1 . |
Parameter name | Type | Description |
---|---|---|
result | TokenRes | The response result. |
Description of result
Parameter name | 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 error code.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback