To retrieve the user details.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of User Management under Security & Control.
POST https://{{host}}/api/public/usersInfo
NOTE: This feature was introduced in ver7.1 of the platform.
Query Parameters
Parameter | Description |
---|---|
host | Environment URL, for example, https://bots.kore.ai |
Body Parameters
Parameter | Description |
---|---|
emailIds
or orgUserIds |
The array of email or org user id for each user whose information is sought |
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response Content Type
application/json
Sample Request
curl -X POST \
https://{{host}}/api/public/usersInfo \
-H 'Content-Type: application/json' \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-d '{
"emailIds"/"orgUserIds": [
"publicuser3@gmail.com",
"test@test.com"
]
}'
Sample Response
- For success case:
[ { "canCreateBot": true, "isDeveloper": true, "userInfo": { "emailId": "publicuser3@gmail.com", "userId": "u-575f16b0-c4c5-5f3c-a740-06288c67dec1", "firstName": "", "lastName": "" }, "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" } ] }, { "userInfo": { "emailId": "test@test.com", "status": "failure", "reason": "Invalid emailId" } } ]
- Failure case:
{ "userInfo": { "emailId": "test@test.com", "status": "failure", "reason": "Invalid emailId" } }