

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 傳送訊息至適用於 Amazon Chime SDK 訊息的 AppInstanceBot
<a name="message-appinstancebot"></a>

您可以使用 [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_SendChannelMessage.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_SendChannelMessage.html) API 將訊息傳送至 AppInstanceBot。您可以將訊息傳送到 AppInstanceBot 為成員的頻道。如果[自然語言理解模型](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html)辨識訊息內容並引發 Amazon Lex 意圖，AppInstanceBot 會以頻道訊息回應並啟動對話方塊。

您也可以將目標訊息傳送至頻道的成員，可以是 AppInstanceUser 或 AppInstanceBot。只有目標和寄件者可以檢視目標訊息。只有可以看到目標訊息的使用者才能對其採取動作。不過，管理員可以刪除他們看不到的目標訊息。

下列範例示範如何使用 AWS CLI 傳送頻道訊息。

```
aws chime-sdk-messaging send-channel-message \
--chime-bearer caller_app_instance_user_arn \
--channel-arn channel_arn \
--content content \
--type STANDARD \
--persistence PERSISTENT
```