設定 bot 註冊設定Configure bot registration settings

適用于: SDK v4APPLIES TO: SDK v4

您可以在 [ bot 設定檔 ] 窗格中,查看及修改 bot 註冊設定,例如顯示名稱、圖示和描述。The bot registration settings, such as display name, icon, and description, can be viewed and modified in the Bot profile pane. 可以在 [設定] 窗格 中,查看及修改 bot 設定,例如訊息端點、Microsoft 應用程式識別碼和 Application Insights。The bot configuration settings, such as messaging endpoint, Microsoft app ID, and Application Insights, can be viewed and modified in the Configuration pane.

Bot 設定檔Bot profile

Bot 設定檔設定。

以下是 Bot 設定檔 欄位的清單:Below is the list of the Bot profile fields:

欄位Field 描述Description
圖示Icon 自訂圖示,用來以視覺方式識別通道中的 bot,以及做為 Microsoft 小組或其他服務中 bot 的圖示。A custom icon to visually identify your bot in channels and as the icon for your bot in Microsoft Teams or other services. 此圖示必須是 PNG 格式,且大小不能超過 30 KB。This icon must be in PNG format, and no larger than 30 KB in size. 此值隨時可以變更。This value can be changed at any time.
顯示名稱Display name 您的 Bot 在頻道與目錄中的名稱。The name of your bot in channels and directories. 名稱長度最多可達35個字元。The name can be up to 35 characters long. 此值隨時可以變更。This value can be changed at any time.
Bot 控制代碼Bot handle Bot 的唯一識別碼。A unique identifier for your bot. 藉由 Bot 服務建立 Bot 之後就無法變更此值。This value cannot be changed after creating your bot with the Bot Service.

若要儲存變更,請 選取分頁 底部的 [套用]。To save your changes, select Apply at the bottom of the blade.

組態Configuration

Bot 配置設定。

以下是 設定欄位的 清單:Below is the list of the Configuration fields:

欄位Field 描述Description
傳訊端點Messaging endpoint 要與您的 Bot 進行通訊的端點。The endpoint to communicate with your bot.
Microsoft 應用程式識別碼Microsoft App ID Bot 的唯一識別碼。Unique identifier for your bot. 這項值不能被改變。This value cannot be changed. 您可以按一下 [管理] 連結以產生新的密碼。You can generate a new password by clicking on the Manage link.
Application Insights 檢測金鑰Application Insights Instrumentation key Bot 遙測的唯一索引鍵。Unique key for bot telemetry. 如果您想要接收此 Bot 的 Bot 遙測資料,請將您的 Azure Application Insights 金鑰複製到此欄位中。Copy your Azure Application Insights Key to this field if you want to receive bot telemetry for this bot. 此為選用值。This value is optional. 在 Azure 入口網站中建立的 Bot 會自行產生此金鑰。Bots created in the Azure Portal will have this key generated for them. 如需此欄位的更多詳細資料,請參閱 Application Insights 金鑰For more details on this field, see Application Insights keys.
Application Insights APIApplication Insights API key Bot 分析的唯一金鑰。Unique key for bot analytics. 如果您想要在儀表板中檢視 Bot 相關分析,請將您的 Azure Application Insights API 金鑰複製到此欄位中。Copy your Azure Application Insights API Key to this field if you want to view analytics about your bot in the Dashboard. 此為選用值。This value is optional. 如需此欄位的更多詳細資料,請參閱 Application Insights 金鑰For more details on this field, see Application Insights keys.
Application Insights 應用程式識別碼Application Insights Application ID Bot 分析的唯一識別碼。Unique ID for bot analytics. 如果您想要在儀表板中檢視 bot 相關分析,請將您的 Azure Insights 應用程式識別碼金鑰複製到此欄位中。Copy your Azure Insights Application ID Key to this field if you want to view analytics about your bot in the Dashboard. 此為選用值。This value is optional. 在 Azure 入口網站中建立的 Bot 會自行產生此金鑰。Bots created in the Azure Portal will have this key generated for them. 如需此欄位的更多詳細資料,請參閱 Application Insights 金鑰For more details on this field, see Application Insights keys.

若要儲存變更,請 選取分頁 底部的 [套用]。To save your changes, select Apply at the bottom of the blade.

應用程式識別碼和密碼Application ID and password

註冊應用程式識別碼和密碼會指派給 bot 的變數 MicrosoftAppID 和檔案 MicrosoftAppPassword appsettings.js 的 ( .net) 和 env (JAVAscript) 。The registration application ID and password are assigned to the bot's variables MicrosoftAppID and MicrosoftAppPassword in the files appsettings.json (.NET) and .env (Javascript).

注意

Bot 通道註冊有應用程式識別碼,但因為沒有相關聯的 app service,所以沒有任何密碼。The Bot Channels Registration has an application ID, but because there is no app service associated with it, there is no password. 若要產生密碼,請遵循下一節中的步驟。To generate the password follow the steps in the next section.

取得註冊密碼Get registration password

註冊應用程式具有 應用程式 識別碼) (應用程式識別碼,以及與其相關聯的 密碼A registration application has an application ID (app ID) and a password associated with it. Azure Bot 服務會為應用程式指派唯一的應用程式識別碼。The Azure Bot Service assigns a unique application ID to the application. 您可以遵循下面所述的步驟來取得密碼。You can obtain the password following the steps described below.

  1. 在瀏覽器中導覽至 Azure 入口網站In your browser, navigate to the Azure portal.

  2. 在 [資源] 清單中,按一下註冊應用程式名稱。In the resource list, click on the registration application name.

  3. 在右面板中,移至 [ Bot 管理 ] 區段,然後按一下 [ 設定]。In the right panel go to the Bot Management section and click Settings. [註冊應用程式 設定 ] 頁面隨即顯示。The registration application Settings page will display.

  4. 按一下 [ Microsoft 應用程式識別碼] 旁邊的 [管理] 連結。Click the Manage link next to Microsoft App ID.

    bot 註冊設定密碼

  5. 在顯示的 [憑證和祕密] 頁面中,按一下 [新增用戶端密碼] 按鈕。In the Certificates & secrets displayed page, click the New client secret button.

    bot 註冊應用程式秘密

  6. 新增描述,選取到期時間,然後按一下 [新增] 按鈕。Add the description, select the expiration time, and click the Add button.

    bot 註冊建立密碼

    這會產生 Bot 的新密碼。This will generate a new password for your bot. 複製此密碼,並儲存至檔案。Copy this password and save it to a file. 這是您唯一會看到此密碼的時機。This is the only time you will see this password. 如果您未儲存完整的密碼,您必須重複此程序來建立新的密碼,以便稍後使用。If you do not have the full password saved, you will need to repeat the process to create a new password should you need it later.

其他資訊Additional Information

您可以從命令列使用 az bot update 來更新 Bot 設定。You can use az bot update to update bot settings from the command line.