1. Home
  2. Kore.ai Conversational Platform
  3. Using Kore.ai APIs
  4. Update User Access API

Update User Access API

To add or remove the ability to access bot builder, create new bots.

GET https://{{host}}/api/public/useraccess

Query Parameters

Parameter Description
host Environment URL, for example, https://bots.kore.ai

Body Parameters

Parameter Description
emailIds The array of user email Ids whose access permissions have to be changed, for example, [“joe@kore.com”, “amy@xyz.com”]
canCreateBot Determines if the specified users can create bots in their Bot Builder accounts. Set to true or false.
isDeveloper Determines if the specified users can have access to Bot Builder. Set to true or false.

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/useraccess \

-H 'Content-Type: application/json' \

-H 'auth: YOUR_JWT_ACCESS_TOKEN' \

-d '{

"emailIds":["sample1@sampleemail.com"],

"canCreateBot":true,

"isDeveloper":true

}'

Sample Response

For success case: 
[“SUCCESS”]

-----------------------------------------------------------------------------------------------

Invalid input combination: canCreateBot: true, isDeveloper: false
{
    "errors": [
        {
            "msg": "Invalid values in the body",
            "code": 403
        }
    ]
}

-----------------------------------------------------------------------------------------------

No email addresses provided: emailIds [ ] is empty
{
"errors": [
{
            "msg": "emailIds cannot be empty",
            "code": 400
           }
           ]
}

-----------------------------------------------------------------------------------------------

Invalid email id or any email which is not present in db (Which is associated with the account)  
{
    "errors": [
        {
            "msg": "One or more entered emails not found",
            "code": 400
        }
    ]
}

-----------------------------------------------------------------------------------------------

One or more emailIds belong to other accounts
{
    "errors": [
        {
            "msg": "Emails << ksudhircse2@gmail.com,ksudhircse@gmail.com >> not associated with your account",
            "code": 400
        }
    ]
}

Was this article helpful to you? Yes No