Authentication
Catalyst Authentication features enable you to add end-users to your Catalyst serverless applications, configure their user accounts and roles, and manage user sign-in and authentication of your application.
Add a New User
Description
This API enables you to add a new end-user to the Catalyst application for a specific platform. When the user has signed up, unique identification values such as ZUID, userID, ZAAID are created for them.
Note: You will be able to add only 25 users in your application in the development environment. After you deploy your application to production, you can include any number of end-users in it.
Request URL
https://api.catalyst.zoho.com/baas/v1/project/{project_id}/project-user/signup
project_id - The unique ID of the project
Request Headers
Authorization: Zoho-oauthtoken 1000.910***************************16.2f****************************57
Content-Type: application/json
PROJECT_ID: {project_id}
Request Method
POST
Scope
scope=ZohoCatalyst.projects.users.CREATE
Note: Passing the role_id of the role that the user must be assigned to, is optional. If you pass the role_id in the API, authentication becomes mandatory. If you skip passing the role_id, Catalyst does not authenticate the request and you need not specify the scope.
Request JSON Properties
Attributes | Data Type | Mandatory | Max Size | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ZAID | String | Yes | 100 | Unique identifier that maps an application to a project | |||||||||||||||||||||||||
user_detailsShow properties | JSON | Yes | The JSON that contains the details of the user | ||||||||||||||||||||||||||
user_details Properties
| |||||||||||||||||||||||||||||
platform_type | String | Yes | N/A | Accepted values: web, android, ios | |||||||||||||||||||||||||
redirect_url | String | No | 200 | The URL to be redirected to, after the user signs up for the application |
SDK Documentation
Sample Request
curl -X POST \
https://api.catalyst.zoho.com/baas/v1/project/3000000002001/project-user/signup \
-H "Authorization: Zoho-oauthtoken 1000.910***************************16.2f****************************57"
-H "Content-Type: application/json" \
-H "PROJECT_ID: 1010309726" \
-d '{
"zaid":"1010309726",
"user_details":{
"first_name":"Rowena",
"last_name":"Simmons",
"email_id":"r.simmons@zylker.com",
"role_id":"1256000000288012"
},
"platform_type":"web",
"redirect_url":"https://logistics.zylker.com/app/index.html"
}'
Sample Response
{
"status": "success",
"data": {
"zaid": 1010309726,
"user_details": {
"user_id": 671930455,
"zuid": 3000000006001,
"zaaid": 1011520995,
"status": "ACTIVE",
"is_confirmed": true,
"email_id": "r.simmons@zylker.com",
"first_name": "Rowena",
"last_name": "Simmons",
"created_time": "May 13, 2019 09:16 PM",
"modified_time": "May 13, 2019 09:16 PM",
"invited_time": "May 13, 2019 09:16 PM",
"role_details": {
"role_id": 1256000000288012,
"role_name": "App Administrator"
},
"user_id": 671930455
},
"redirect_url": "https://logistics.zylker.com/app/index.html",
"platform_type": "web",
"org_id": 1011520995
}
}
Sample SDK Code
let user = User(firstName: "Amelia", lastName: "Burrows", email: "emma@zylker.com")
AuthHandler.signUp(user: user) { (result) in
switch result{
case .success(let user):
print("\(user) successfully created")
case .error(let error):
print("Error in creating user \(error)")
}
}