봇에 대한 채널 활성화를 시작하는 데 사용됩니다.
이 API를 사용하려면 앱은 ChannelManagement 아래의 채널 관리의 관리자 API 범위가 필요합니다.
POST https://{{host}}/api/public/bot/channels
봇에 대한 채널 활성화를 시작하는 데 사용됩니다.
이 API를 사용하려면 앱은 ChannelManagement 아래의 채널 관리의 관리자 API 범위가 필요합니다.
POST https://{{host}}/api/public/bot/channels
| 매개 변수 | 필수/선택 사항 | 설명 |
|---|---|---|
| host | 필수 | 환경 URL(예: https://bots.kore.ai) |
| 매개 변수 | 필수/선택 사항 | 설명 |
|---|---|---|
| BotId | 필수 | 봇의 일반 설정 페이지에서 이를 액세스할 수 있습니다. |
| AppName | 필수 | 이 봇과 연결된 앱은 봇의 앱 관리 페이지에서 확인할 수 있습니다 |
| ClientId | 필수 | 이 봇과 연결된 앱의 클라이언트 ID로, 봇의 앱 관리 페이지에서 확인할 수 있습니다 |
| type | 필수 |
이 봇에 대해 활성화할 채널입니다. 채널 유형 세부 정보는 다음과 같습니다.
|
다음 구문을 포함한 헤더에 JWT를 포함한 API를 호출합니다. auth: {{JWT}}
application/json
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"botId":"{{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"
}'
플랫폼의 응답은 활성화 중인 채널에 따라 다릅니다. 웹/모바일 SDK에 대한 샘플 응답은 다음과 같습니다.
{
"displayName": "Web / Mobile Client",
"type": "rtm",
"name": "Web / Mobile Client",
"isAlertsEnabled": false,
"enable": true,
"sttEnabled": false,
"sttEngine": "kore"
}
Webhook 채널에 대한 샘플 응답은 다음과 같습니다.
{
"displayName": "webhook",
"enable": true,
"isAsync": false,
"type": "ivr",
"url": "<webhook-url>"
}
Slack 채널에 대한 샘플 응답은 다음과 같습니다.
{
"streamUserAccountId": "su-bxxxxfax-exba-xxeb-xxxc-xxxacxxxxxx",
"type": "slack",
"enable": false,
"verificationToken": "mxSxdWXcQxEFxrRPEdeoCC"
}
msteams 채널에 대한 샘플 응답은 다음과 같습니다.
{
"type": "msteams",
"enable": false,
"accountId": "su-bcf9xxxfc-dxxx-xxxc-xexa-bxxexxxxxxx",
"app_id": "xxebcfxf-xxxd-xxca-xxea-bxxxxxxaxxx"
}
ボットのチャネルの有効化を開始するために使用されます。
このAPIを使用するために、アプリは [ChannelManagement] の [チャネル管理] の管理APIスコープを必要とします。
ポスト https://{{host}}/api/public/bot/channels
| パラメータ | 必須/任意 | 説明 |
|---|---|---|
| ホスト | 必須 | 環境URL(例: https://bots.kore.ai) |
| パラメータ | 必須/任意 | 説明 |
|---|---|---|
| BotId | 必須 | ボットID – ボットの [一般設定] ページからアクセスすることができます。 |
| AppName | 必須 | このに関連するアプリは、ボットの [アプリを管理] ページから取得することができます。 |
| ClientId | 必須 | このボットに関連するアプリのクライアントIDは、ボットの [アプリを管理] ページから取得することができます。 |
| type | 必須 | このボットで有効にしたいチャネルです。チャネルタイプの詳細は以下の通りです。
|
以下の構文を使用して、JWTをヘッダーに含むAPIを呼び出します。 auth: {{JWT}}
application/json
curl --location --request POST 'https://{{host}}/api/public/channels' \ --header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \ --header 'Content-Type: application/json' \ --data-raw '{ "botId":"{{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" }'
プラットフォームからの応答は、有効になっているチャネルによって異なります。ウェブ/モバイルSDKのサンプル応答:
{ "displayName": "Web / Mobile Client", "type": "rtm", "name": "Web / Mobile Client", "isAlertsEnabled": false, "enable": true, "sttEnabled": false, "sttEngine": "kore" }
Webhookチャネルのサンプル応答:
{ "displayName": "webhook", "enable": true, "isAsync": false, "type": "ivr", "url": "<webhook-url>" }
Slackチャネルのサンプル応答:
{ "streamUserAccountId": "su-bxxxxfax-exba-xxeb-xxxc-xxxacxxxxxx", "type": "slack", "enable": false, "verificationToken": "mxSxdWXcQxEFxrRPEdeoCC" }
MSTeamsチャネルのサンプル応答:
{ "type": "msteams", "enable": false, "accountId": "su-bcf9xxxfc-dxxx-xxxc-xexa-bxxexxxxxxx", "app_id": "xxebcfxf-xxxd-xxca-xxea-bxxxxxxaxxx" }
Used to initiate enable a channel for a bot.
To use this API, app needs the Admin API Scope of Channel Management under ChannelManagement.
POST https://{{host}}/api/public/channels
| Parameter | Required/ Optional |
Description |
|---|---|---|
| host | Required | Environment URL, for example, https://bots.kore.ai |
| Parameter | Required/ Optional |
Description |
|---|---|---|
| BotId | Required | Bot ID – You can access it from the General Settings page of the bot. |
| AppName | Required | The app associated with this Bot, you can obtain it from the Manage Apps page of the bott |
| ClientId | Required | The client id for the app associated with this Bot, you can obtain it from the Manage Apps page of the bott |
| type | Required | Channel that you want to enable for this Bot. Following are the channel type details:
|
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
application/json
curl --location --request POST 'https://{{host}}/api/public/channels' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"botId":"{{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"
}'
The response from the platform depends on the channel being enabled.
Sample response for web/mobile SDK:
{
"displayName": "Web / Mobile Client",
"type": "rtm",
"name": "Web / Mobile Client",
"isAlertsEnabled": false,
"enable": true,
"sttEnabled": false,
"sttEngine": "kore"
}
Sample response for webhook channel:
{
"displayName": "webhook",
"enable": true,
"isAsync": false,
"type": "ivr",
"url": "<webhook-url>"
}
Sample response for slack channel:
{
"streamUserAccountId": "su-bxxxxfax-exba-xxeb-xxxc-xxxacxxxxxx",
"type": "slack",
"enable": false,
"verificationToken": "mxSxdWXcQxEFxrRPEdeoCC"
}
Sample response for msteams channel:
{
"type": "msteams",
"enable": false,
"accountId": "su-bcf9xxxfc-dxxx-xxxc-xexa-bxxexxxxxxx",
"app_id": "xxebcfxf-xxxd-xxca-xxea-bxxxxxxaxxx"
}