Add New User
You can add end-users to your Catalyst application and they will be assigned to a default organization automatically, if the organization is not specified explicitly. When the user is added, a unique user_ID and ZUID are generated for them by Catalyst.
Create a Dictionary
Before you add a new user to the Catalyst application, you must create a dictionary that contains the user details such as the last name of the user, the role they have to be assigned to, their email address, the application platform and the ZAID data based on the current working environment. The dictionary that contains these details will be passed as a parameter to the register_user() method.
- You must provide the values for email_id and first_name to register a user mandatorily.
- You can obtain the role_id from the Roles section in Authentication in the Catalyst console.
- You can obtain the ZAID from the Environment settings in your Catalyst console.
- When inviting a new user, you can configure the sender’s email address, subject and the email message. You must add the email address in the Catalyst Mail Component and get it verified before using it in the SDK code.
copy#Create a dictionary signup_config = { "platform_type": "web", "zaid": "81008807534807534", "template_details": { "senders_mail": "dogogetu@tutuapp.bid", "subject": "Welcome to %APP_NAME%", "message": "<p>Hello ,</p> <p>Follow this link to join in %APP_NAME% .</p> <p><a href='%LINK%'>%LINK%</a></p> <p>If you didn’t ask to join the application, you can ignore this email.</p> <p>Thanks,</p> <p>Your %APP_NAME% team</p>", }, } user_details = { "first_name": "Amelia", "last_name": "Burrows", "role_id": "1008807534", "email_id": "amelia.burrows@zylker.com", }
Add New User
After you have configured the necessary user information in the dictionary, you can proceed to add a new user to an organization. In this case, an organization will automatically be assigned to the user.
The register_user() method handles the user creation process and returns a response. To know more about the component instance authentication_service used below, please refer to this section.
Parameters Used
Parameter Name | Data Type | Definition |
---|---|---|
signup_config | Object | A Mandatory parameter. Will store the user registration details, including the application platform, ZAID, and the email information to be sent after registration. |
user_details | Object | A Mandatory parameter. Will hold the user registration details such as first name, last name, email ID and the ID of the organization to which the user has to be added. |
copy#Add a new user authentication_service = app.authentication() response_data = authentication_service.register_user(signup_config, user_details)
A sample response is shown below :
copy{ "zaid":"81008807534807534", "user_details":{ "zuid":"1005641290", "org_id":"1005641456", "status":"ACTIVE", "is_confirmed":false, "email_id":"amelia.burrows@zylker.com", "first_name":"Amelia", "last_name":"Burrows", "created_time":"Aug 12, 2021 12:33 PM", "modified_time":"Aug 12, 2021 12:33 PM", "invited_time":"Aug 12, 2021 12:33 PM", "role_details":{ "role_name":"App User", "role_id":"2305000000006024" }, "user_type":"App User", "user_id":"2305000000007752", "project_profiles":[ ] }, "redirect_url":"https://aliencity-66446133.development.catalystserverless.com/app/", "platform_type":"web", "org_id":"1005641456" }
Last Updated 2025-03-28 18:24:49 +0530 +0530
Yes
No
Send your feedback to us