To retrieve the user details.
This API requires JWT generated by an application created only from the Bot Admin Console.
This feature was introduced in ver7.1 of the platform.
Method | POST |
Endpoint | https://{{host}}/api/public/usersInfo |
Content Type | application/json |
Authorization | auth: {{JWT}}
|
API Scope |
|
Path Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
Sample Request
curl -X POST \ https://{{host}}/api/public/usersInfo \ -H 'Content-Type: application/json' \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -d '{ "emailIds": [ "publicuser3@gmail.com", "test@test.com" ], "status":"active" }'
Body Parameters
Parameter | Description |
---|---|
emailIds | The array of email id’s for each user whose information is sought |
Status (optional) | Indicates the status of the user. Possible values:
|
Sample Response
- For success case:
[ { "canCreateBot": true, "isDeveloper": true, "userInfo": { "emailId": "publicuser3@gmail.com", "userId": "u-575f16b0-c4c5-5f3c-a740-06288c67dec1", "firstName": "", "lastName": "" "status": "active", "lastLogin": "2023-08-08T05:55:56.698Z" }, "roles": { "btRoles": [ { "roleId": "5d9d920dabdc1e6e8ec99342", "roleName": "sample bot role 2", "groups": [], "botId": "st-16511425-15c5-5cdf-b652-a796db7d134b", "botName": "bot6ent" }, { "roleId": "5bb1ef53e6519fa9f722e69b", "roleName": "Bot Tester", "groups": [ "group1" ], "botId": "st-ac60188d-cdf4-5e58-a249-178e54cd85b7", "botName": "dashboardtest" }, { "roleId": "5d9d8db30d54920a8df1e68b", "roleName": "sample bot role1", "groups": [], "botId": "st-b8525f88-6dd3-54a7-8a97-734ecb748733", "botName": "bot5ent" } ], "adminRoles": [ { "roleId": "5cd4081158217217cccabb7e", "roleName": "admin", "groups": [] }, { "roleId": "5d9d8d930d54920a8df1e689", "roleName": "sample admin role1", "groups": [] } ] }, "assignBotTasks": [ { "botId": "st-xxxxx-xxx-xxx-xxx-xxxxx", "dialogs": [ "dg-xxxxx-xxx-xxx-xxx-xxxxx" ], "actions": [], "alerts": [], "knowledgeTask": [] } ], "groups": [ { "groupId": "e-06b41cdd-7678-5394-b958-40ca5662f502", "groupName": "group1" } ] } ]
- Failure case:
[ { "userInfo": { "emailId": "a3q4", "status": "failure", "reason": { "statusCode": 400, "status": 400, "customCode": 400, "errors": [ { "msg": "User not found. Please check the provided email address.", "code": 400 } ], "_headers": {}, "message": "User not found. Please check the provided email address.", "name": "BadRequest" } } } ]