Microsoft.Bot.Connector - To Address是指{}这不是一个已知的 [英] Microsoft.Bot.Connector - The To Address refers to {} which is not a known

查看:131
本文介绍了Microsoft.Bot.Connector - To Address是指{}这不是一个已知的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



努力实现与用户开始新的对话,即机器人(bot)应该在接收到一些触发器之后发起与用户的对话。



我引用了 http://docs.botframework.com/

  var connector = new ConnectorClient(); 

消息newMessage = new Message();
newMessage.From = new ChannelAccount(){Address =[email the bot is registered with],Name =Awesome Bot,ChannelId =email,IsBot = true};
newMessage.To = new ChannelAccount(){Address = user.Email,Name = ${user.FirstName} {user.LastName},ChannelId =email,IsBot = false};
newMessage.Text = message;
newMessage.Language =en;

connector.Messages.SendMessage(newMessage);

机器人在Azure中生活并在框架中注册。
当我调用上面的代码,看起来连接器正在向api.botframework.com发送请求,但是接收 404 。我也看到以下错误消息: To Address是指[用户电子邮件],不是已知的



听起来像错误被切断了。



不知道我在这里做错了。

解决方案>

我们担心垃圾邮件发送者滥用通过我们的服务器发送电子邮件的能力,因此我们限制了向尚未在会话或系统用户的人发送消息的能力。我们的想法是,我们将启用此功能作为在我们的目录或付费客户端被批准的一部分。


Developing a bot to be used with the email channel (Office 365).

Struggling to implement a "Starting a new conversation with the user", i.e. the bot should initiate conversation with the user(s) after receiving some triggers.

I'm referencing the example available on http://docs.botframework.com/.

    var connector = new ConnectorClient();

    Message newMessage = new Message();
    newMessage.From = new ChannelAccount() {  Address = "[email the bot is registered with]", Name = "Awesome Bot", ChannelId = "email", IsBot = true };
    newMessage.To = new ChannelAccount() {  Address = user.Email, Name = $"{ user.FirstName } {user.LastName}", ChannelId = "email", IsBot = false };
    newMessage.Text = message;
    newMessage.Language = "en";

    connector.Messages.SendMessage(newMessage);

The bot is live in Azure and registered with the framework. When I invoke the above code, looks like the connector is sending a request to api.botframework.com, but receives 404 back. I'm also seeing the following error message: The To Address refers to [user email] which is not a known

Sounds like the error is cut off.

Not sure what I'm doing wrong here.

解决方案

We were worried about spammers abusing the ability to send email through our servers, so we limited the ability to send a message to people who are not already in the conversation or users of the system. Our thoughts are that we will enable this functionality as part of being approved in our directory or as for paid clients.

这篇关于Microsoft.Bot.Connector - To Address是指{}这不是一个已知的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆