难以访问Microsoft Bot Framework

时间:2016-04-27 14:51:32

标签: c# botframework

我正在尝试构建一个单独的应用程序 - 基本上是在我的Intranet上运行的守护程序 - 可以连接到Bot Connector应用程序并访问用户和机器人之间的现有对话。

首先,我正在使用DirectLine NuGet包,然后使用在我通过模拟器启动的对话中找到的conversationId搜索现有消息。

例如,我启动了模拟器,并得到了conversationId“8a684db8”。在我的控制台应用程序中,我有以下相关代码:

var uri = new Uri("https://directline.botframework.com");
            DirectLineClientCredentials creds = new DirectLineClientCredentials(secret); //lot into the bot framework
            DirectLineClient client = new DirectLineClient(uri, creds); //connect the client
            Conversations convs = new Conversations(client); //get the list of conversations belonging to the bot? Or does this start a new collection of conversations?
            var existing_conv_messages = convs.GetMessages(convo_id);

现在,当我尝试运行它时,我在尝试查找现有消息的最后一行收到“Not Found”错误。

任何人都有解决方案吗?

1 个答案:

答案 0 :(得分:0)

发送给模拟器​​的对话不会发送到Direct Line API。对于可在Direct Line中查看的消息,需要通过在线运行的Connector和Direct Line服务发送消息。