{"id":22683,"date":"2019-11-01T11:05:46","date_gmt":"2019-11-01T11:05:46","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-3\/?p=22683"},"modified":"2022-12-02T10:20:04","modified_gmt":"2022-12-02T10:20:04","slug":"get-user-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/api-guide\/get-user-api\/","title":{"rendered":"Get User Information"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To retrieve the user details.<\/p>\n<p class=\"note\">This API requires JWT generated by an application created only from the Bot Admin Console.<br \/>This feature was introduced in ver7.1 of the platform.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Method<\/strong><\/td>\n<td>POST<\/td>\n<\/tr>\n<tr>\n<td><strong>Endpoint<\/strong><\/td>\n<td><code>https:\/\/{{host}}\/api\/public\/usersInfo<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>Content Type<\/strong><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>Authorization<\/strong><\/td>\n<td>\n<p><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" rel=\"noopener noreferrer\" target=\"_blank\">How to generate the JWT Token.<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong>API Scope<\/strong><\/td>\n<td>\n<ul>\n<li>Bot Builder: Not Applicable<\/li>\n<li>Admin Console: User Management > User Management<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp; <\/p>\n<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>host<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre>curl -X POST \\\r\n  https:\/\/{{host}}\/api\/public\/usersInfo \\\r\n  -H 'Content-Type: application\/json' \\\r\n  -H 'auth: YOUR_JWT_ACCESS_TOKEN' \\\r\n  -d '{\r\n    \"emailIds\"\/\"<span style=\"font-weight: 400\">orgUserIds<\/span>\": [\r\n        \"publicuser3@gmail.com\",\r\n        \"test@test.com\"\r\n    ]\r\n}'<\/pre>\n<p>&nbsp; <\/p>\n<h2><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>\n<p>emailIds<\/p>\n<p>or <span style=\"font-weight: 400\">orgUserIds<\/span><\/td>\n<td>The array of email or org user id for each user whose information is sought<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp; <\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<ul>\n<li>For success case:\n<pre class=\"code-limit-400px\">[\r\n    {\r\n        \"canCreateBot\": true,\r\n        \"isDeveloper\": true,\r\n        \"userInfo\": {\r\n            \"emailId\": \"publicuser3@gmail.com\",\r\n            \"userId\": \"u-575f16b0-c4c5-5f3c-a740-06288c67dec1\",\r\n            \"firstName\": \"\",\r\n            \"lastName\": \"\"\r\n        },\r\n        \"roles\": {\r\n            \"btRoles\": [\r\n                {\r\n                    \"roleId\": \"5d9d920dabdc1e6e8ec99342\",\r\n                    \"roleName\": \"sample bot role 2\",\r\n                    \"groups\": [],\r\n                    \"botId\": \"st-16511425-15c5-5cdf-b652-a796db7d134b\",\r\n                    \"botName\": \"bot6ent\"\r\n                },\r\n                {\r\n                    \"roleId\": \"5bb1ef53e6519fa9f722e69b\",\r\n                    \"roleName\": \"Bot Tester\",\r\n                    \"groups\": [\r\n                        \"group1\"\r\n                    ],\r\n                    \"botId\": \"st-ac60188d-cdf4-5e58-a249-178e54cd85b7\",\r\n                    \"botName\": \"dashboardtest\"\r\n                },\r\n                {\r\n                    \"roleId\": \"5d9d8db30d54920a8df1e68b\",\r\n                    \"roleName\": \"sample bot role1\",\r\n                    \"groups\": [],\r\n                    \"botId\": \"st-b8525f88-6dd3-54a7-8a97-734ecb748733\",\r\n                    \"botName\": \"bot5ent\"\r\n                }\r\n            ],\r\n            \"adminRoles\": [\r\n                {\r\n                    \"roleId\": \"5cd4081158217217cccabb7e\",\r\n                    \"roleName\": \"admin\",\r\n                    \"groups\": []\r\n                },\r\n                {\r\n                    \"roleId\": \"5d9d8d930d54920a8df1e689\",\r\n                    \"roleName\": \"sample admin role1\",\r\n                    \"groups\": []\r\n                }\r\n            ]\r\n        },\r\n        \"assignBotTasks\": [\r\n            {\r\n                \"botId\": \"st-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n                \"dialogs\": [\r\n                    \"dg-xxxxx-xxx-xxx-xxx-xxxxx\"\r\n                ],\r\n                \"actions\": [],\r\n                \"alerts\": [],\r\n                \"knowledgeTask\": []\r\n            }\r\n        ],\r\n        \"groups\": [\r\n            {\r\n                \"groupId\": \"e-06b41cdd-7678-5394-b958-40ca5662f502\",\r\n                \"groupName\": \"group1\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"userInfo\": {\r\n            \"emailId\": \"test@test.com\",\r\n            \"status\": \"failure\",\r\n            \"reason\": \"Invalid emailId\"\r\n        }\r\n    }\r\n]\r\n<\/pre>\n<\/li>\n<li>Failure case:\n<pre>    {\r\n        \"userInfo\": {\r\n            \"emailId\": \"test@test.com\",\r\n            \"status\": \"failure\",\r\n            \"reason\": \"Invalid emailId\"\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"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}} See How to generate the JWT Token. API Scope Bot Builder: Not Applicable Admin Console: User Management...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-22683","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/22683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/comments?post=22683"}],"version-history":[{"count":13,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/22683\/revisions"}],"predecessor-version":[{"id":49553,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/22683\/revisions\/49553"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/media?parent=22683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/categories?post=22683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/tags?post=22683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}