Verify User Permission

Last Updated on : 2023-07-06 09:14:27download

Verify whether a user has the specified permission.

API address

POST: /v1.0/iot-02/users/{uid}/actions/permission-valid

Request parameter

Parameter nameTypeINRequiredDescription
uidStringuritrueThe user ID (UID).

Description of body

Parameter nameTypeINRequiredDescription
permission_codeString trueThe identifier of a permission.

Return parameter

Parameter nameTypeDescription
resultBooleanIndicates whether the operation is successful. Valid values:
  • true: success.
  • false: failure.

Request example

POST: /v1.0/iot-02/users/123/actions/permission-valid
{
  "permission_code": "permissionCodenjds"
}

Return example

{
    "tid": "524bc6be948811ec82481264f1be8bd1",
    "result": true,
    "t": 1645607375967,
    "success": true
}

Error code

For more information, see error code.