Authorization Management

Last Updated on : 2025-07-08 08:44:41download

API list

Request method API Description
POST /v1.0/illumination/account/permission/add Grant project space permissions to the account.
GET /v1.0/illumination/account/list Get the list of authorized accounts.

Grant project space permission

API description

Grant project space permissions to a sub-account.

API endpoint

POST /v1.0/illumination/account/permission/add

Request parameter

Parameter Type Parameter type Description Required
projectId String body The project ID. Yes
tuyaUid String body Tuya user ID. Yes
roomIdList List body The list of space IDs. Yes

Response parameter

Parameter Type Description
Code Integer The response code. For more information, see the error code section. It is empty if the request is successful.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded.
  • false: failed.
msg String The error message that is returned if the request fails. It is empty if the request is successful.
t Long The returned 13-digit timestamp.
result Object The returned result.

Description of result

{
  true/false
}

Sample request

{
  "tuyaUid": "ay1563*******1zJw30",
  "projectId": "123324234",
  "roomIdList": ["1420922162969059328"]
}

Sample response

{
    "success":true,
    "t":1541071460239,
    "result": true
}

Get the list of authorized accounts

API description

Get the list of authorized accounts.

API endpoint

GET /v1.0/illumination/account/list

Request parameter

Parameter Type Parameter type Description Required
loginName String body The login name. No
nickName String body The nickname. No
page int body The current page number. No
pageSize int body The number of items returned per page. No

Response parameter

Parameter Type Description
Code Integer The response code. For more information, see the error code section. It is empty if the request is successful.
success Boolean Indicates whether the operation is successful. Valid values:
  • true: succeeded.
  • false: failed.
msg String The error message that is returned if the request fails. It is empty if the request is successful.
t Long The returned 13-digit timestamp.
result Object The returned result.

Description of result

{
  "total": "int",
  "list": [
    {
      "uid": "String // The UID",
      "loginName": "String // The login name",
      "nickName": "String // The nickname",
      "roleCode": "String // The role code",
      "roleName": "String // The role name",
      "remark": "String // The remarks",
      "createDate": "String // The creation date",
      "adminId": "String // The account ID",
      "page": "int",
      "pageSize": "int"
    }
  ]
}

Sample request

{
  "loginName": "xxx",
}

Sample response

{
  "total": "int",
  "list": [
    {
      "uid": "xxxx",
      "loginName": "",
      "nickName": "",
      "roleCode": "",
      "roleName": "",
      "remark": "",
      "createDate": "",
      "adminId": "",
    }
  ]
}