Enable or Disable a User
Catalyst allows you to disable or enable a user at any time. A disabled user will be signed up to your application but will not be able to access your application.
The SDK snippet below demonstrates enabling and disabling an end-user using the update_user_status(userId, user_status) method.
The user is referred by their unique User ID. You can find the User IDs of all users by navigating to the Users > User Management section of the Authentication component.
To know more about the component instance authentication_service used below, please refer to this section.
To Enable a User
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
userId | String | A Mandatory parameter. Will hold the UserID of the user to be enabled for the application. |
user_status | String | A Mandatory parameter. Will hold the default value "enable". |
copy
authentication_service = app.authentication() user_details = authentication_service.update_user_status('6759000000124659', 'enable') # Replace the user id
To Disable a User
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
userId | String | A Mandatory parameter. Will hold the UserID of the user to be disabled for the application. |
user_status | String | A Mandatory parameter. Will hold the default value "disable" |
copy
authentication_service = app.authentication() user_details = authentication_service.update_user_status('6759000000124659', 'disable') # Replace the user id
Info : Refer to the SDK Scopes table to determine the required permission level for performing the above operation.
Last Updated 2025-03-28 18:24:49 +0530 +0530
Yes
No
Send your feedback to us
Skip
Submit