Used to initiate enable a channel for a bot.
To use this API, app needs the Bot Builder API Scope of Channel Management under ChannelManagement.
POST https://{{host}}/api/public/bot/channels
Query Parameters
| Parameter | Description |
|---|---|
| host | Environment URL, for example, https://bots.kore.ai |
Body Parameters
| Parameter | Description |
|---|---|
| BotId | Bot ID – You can access it from the General Settings page of the bot. |
| AppName | The app associated with this Bot, you can obtain it from the Manage Apps page of the bott |
| ClientId | The client id for the app associated with this Bot, you can obtain it from the Manage Apps page of the bott |
| type | Channel that you want to enable for this Bot, see below for details |
Channel Types
- skypeforbusiness – for Skype for Business
- msteams – for Microsoft Teams
- twitter – for Twitter
- spark – for Cisco Spark
- rtm – for Web/Mobile Client
- Facebook – for Facebook Messenger
- slack – for Slack
- skype – for Skype
- kore – for Kore Messenger
- email – for Email
- sms – for SMS
- wfacebook – for Workplace by Facebook
- ringcentral – for RingCentral Glip
- jabber – for Cisco Jabber
- yammer – for Microsoft Yammer
- alexa – for Amazon Alexa
- twiliovoice – for Twilio Voice
- telegram – for Telegram
- ivr – for Webhook
- ivrVoice – for IVR
- line – for Line Messenger
- liveperson – for Liveperson
- googleactions – for Google Assistant
- wechat – for WeChat
- hangoutchat – for Hangout Chat
- mattermost – for Mattermost
Authorization
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
Response content type
application/json
Sample Request
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"streamId":"{{bot Id}}",
"channelDetails":{
"app": {
"appName": "App Name",
"clientId": "cs-fxxxfxd-bxee-xaxx-bxaf-dxxxxe2c26e3"
},
"createInstance": false,
"displayName": "Web / Mobile Client",
"enable": true,
"isAsync": false,
"type": "rtm"
},
"type":"rtm"
}'
Sample Response
{
"_id": "st-182ea004-cd39-57d6-9a48-c9d27ac4019d",
"visibility": {
"namespace": "enterpriseNpublic",
"namespaceIds": [
"u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660"
]
},
"autoApprovalSettings": {
"newChannels": false,
"newTasks": false,
"channelUpgrades": false,
"taskUpgrades": false,
"autoPublishAll": false
},
"clustering": {
"enabled": false,
"requestsPerDay": 0
},
"approvedChannels": [
"ivr",
"rtm"
],
"notifyUserViaEmail": true,
"workbenchConfigurable": false,
"purpose": "customer",
"hasUserEndpoint": false,
"codevelopers": [],
"offKoraConfirmation": false,
"state": "configured",
"type": "default",
"universalBotState": "configured",
"canTryOut": false,
"showInMp": false,
"defaultLanguage": "en",
"supportedLanguages": [
"en"
],
"taskApprovedLanguages": [
"en"
],
"publishedDisabledLangs": [],
"allowInheritance": true,
"inheritanceType": 1,
"status": 1,
"isDeflect": false,
"parentId": "false",
"sessionClosureProcess": 0,
"sessionInactiveTime": 900000,
"skipSessionMessage": false,
"vNameSpace": [
"ns-b822b9ce-d6de-5ce5-b49a-9dd5aadb468a"
],
"languageConfigurations": {
"en": {
"enabled": true
}
},
"lastModifiedOn": "2021-01-12T11:10:36.817Z",
"accountId": "5e81ba854b3b29780134c7fb",
"verify_token": "025b98323fb5bd334d93d47206e962b8f5b58cab3cce4bc8eabfdc97a082c84b",
"createdBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660",
"lastModifiedBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660",
"createdOn": "2021-01-12T08:47:18.113Z",
"configuredBots": [],
"fallbackConfiguredBots": [],
"awaitingApprovalBots": [],
"publishedBots": [],
"fallbackPublishedBots": [],
"unpublishedBots": [],
"awaitingUnpublishedBots": [],
"suspendedBots": [],
"awaitingFallbackBots": [],
"upgradedBots": [],
"rejectedBots": [],
"inclusiveConfiguredBots": [],
"inclusivePublishedBots": [],
"awaitingInclusiveBots": [],
"variables": [],
"channelStatus": {
"rtm": {
"name": "Web / Mobile Client",
"state": "update"
}
},
"appPreferences": {
"rtmAppId": "cs-f3333f0d-b4ee-5a57-b7af-d5278e2c26e3"
},
"requestedBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660",
"versionComment": "new update",
"license": {
"extraSessions": 0,
"extraCredits": 0,
"sessionsUsed": 0,
"creditsUsed": 0,
"planId": "trial",
"planName": "Free",
"startDate": "2021-01-12T08:47:48.504Z",
"endDate": "2021-02-11T08:47:48.504Z",
"subscriptionId": "sc-9eb6b501-343c-5a59-b832-705172b7e4df",
"baseAllowedSessions": 3000,
"billedSessions": 3000,
"unBilledSessions": 0,
"billingType": "free",
"nextRunAt": "2021-01-12T08:47:48.504Z",
"product": "Bots",
"licenseId": "ls-7869eb1a-9b7f-5bbb-b663-555650389494"
},
"audioCodesSettings": {
"enable": true,
"timeout": 5000,
"retry_limit": 3,
"callTerminationHandler": "",
"bargein": false,
"timeoutPrompts": [
[
{
"type": "text",
"value": "I have not received any input. Please provide your input"
}
]
]
},
"ivrSettings": null,
"twilioVoiceSettings": {
"enable": true,
"timeout": 5000,
"retry_limit": 3,
"callTerminationHandler": "",
"bargein": false,
"timeoutPrompts": [
[
{
"type": "text",
"value": "I have not received any input. Please provide your input"
}
]
]
},
"resourceid": "btstreams",
"errorCodes": {
"pollError": []
},
"name": "ConsumerAutomationBot748368",
"hasTenant": true,
"tenancy": {
"helpHint": "tenant url"
},
"languagePreferences": {
"type": "lifeTime"
},
"baseUrl": "https://{tenant}",
"color": "#009dab",
"botEvents": {
"ON_CONNECT_EVENT": {
"enabled": true,
"action": "showMsg",
"task": null,
"script": ".",
"msg": [],
"welcomeIvrOptions": []
},
"TASK_FAILURE_EVENT": {
"enabled": true,
"action": "showMsg",
"task": null,
"script": ".",
"msg": [],
"welcomeIvrOptions": []
}
},
"icon": "https://dlnwzkim0wron.cloudfront.net/f-9a504aaf-065b-579d-a68a-db219d18ce66.png",
"universalBotVersion": 1,
"description": "ConsumerAutomationBot712202",
"nlMeta": {
"mlUtterances": 5,
"patterns": 0,
"synonyms": 19
},
"evVNameSpace": [],
"krVNameSpace": [],
"channels": [
{
"displayName": "Web / Mobile Client",
"type": "ivr",
"isAsync": false,
"enable": true,
"url": "https://bots.kore.ai/chatbot/hooks/st-182ea004-cd39-57d6-9a48-c9d27ac4019d"
},
{
"displayName": "Web / Mobile Client",
"type": "rtm",
"enable": true
}
],
"sdkSubscription": {
"sdkClientId": "cs-f3333f0d-b4ee-5a57-b7af-d5278e2c26e3",
"sdkHostUri": "https://43cbee12.ngrok.io",
"subscribedFor": [
"onMessage",
"onHook",
"onEvent",
"onAlert",
"onVariableUpdate",
"onAgentTransfer"
],
"clientSecret": "7EJjY4rpyIGf+S0ROembjwfq1hmB55dZ7uU9g4SuoDw=",
"createdBy": "u-fb90f166-a5fd-5fc8-ab44-6c5388a1e660",
"appName": "Testone",
"algorithm": "HS256"
},
"_resolve": [
"createdBy",
"codevelopers",
"sdkSubscription.createdBy"
],
"defaultDialogId": null,
"detectMultiIntent": false,
"enableAutoUtteranceAddition": null,
"enableMLNER": null,
"recentBotLimit": null,
"assignAllChildBots": null,
"interruptOptions": {
"interruptsEnabled": true,
"numTasksToHold": "1",
"type": {
"option": "developer",
"message": ""
},
"holdUxOptions": {
"option": "holdCurrTask",
"message": ""
},
"resumeUxOptions": {
"option": "notifyUser",
"message": "Resuming interrupted task"
}
},
"isCsMatchEnabled": false,
"enableNegativePatterns": null,
"amendConfig": {},
"permissions": {
"BOTBUILDER_TASKS": [
"FULL"
],
"BOTBUILDER_NATURAL_LANGUAGE": [
"FULL"
],
"BOTBUILDER_KNOWLEDGE_GRAPH": [
"FULL"
],
"BOTBUILDER_BATCH_TESTING": [
"FULL"
],
"BOTBUILDER_BOT_DEVELOPERS": [
"FULL"
],
"BOTBUILDER_BOT_SETTINGS": [
"FULL"
],
"BOTBUILDER_BOT_IMPORT": [
"YES"
],
"BOTBUILDER_EXTENSIONS": [
"YES"
],
"BOTBUILDER_PUBLISH_BOT": [
"YES"
],
"BOTBUILDER_CHANNELS": [
"YES"
],
"BOTBUILDER_DASHBOARD": [
"YES"
],
"BOTBUILDER_BOT_ANALYTICS": [
"YES"
],
"BOTBUILDER_CUSTOM_DASHBOARDS": [
"FULL"
],
"BOTBUILDER_STORYBOARD": [
"FULL"
],
"BOTBUILDER_APPS_AND_SCOPES": [
"YES"
]
},
"taskCounts": {
"alerts": [
{
"state": "published",
"count": 4,
"deletedCount": 0
}
],
"actions": [
{
"state": "published",
"count": 2,
"deletedCount": 0
}
],
"ktasks": [],
"dialogs": [
{
"state": "published",
"visibility": "enterprise",
"count": 80,
"deletedCount": 0
}
],
"smalltalks": [],
"informationTasks": [
{
"state": "published",
"count": 1,
"deletedCount": 0
}
],
"panels": [],
"widgets": [],
"forms": [],
"flows": {
"paramMaps": [],
"taskDGParamMaps": []
}
}
}