简体   繁体   English

Bot 框架 - 从我的应用服务 Directline api 生成 Directline 令牌不起作用

[英]Bot framework - generating directline token from my app service directline api not working

I have created a bot(c#) and trying to connect it to webchat using directline.我创建了一个机器人(c#)并尝试使用直线将其连接到网络聊天。 I referred this here github repo and trying to connect my bot to webchat using directline token.在这里提到了这个 github repo 并尝试使用 Directline 令牌将我的机器人连接到网络聊天。 but this directline extension >https://myappservicename.azurewebsites.net/directline/token won't generate any token if i send a post request.但是,如果我发送发布请求,此直连扩展 >https://myappservicename.azurewebsites.net/directline/token 将不会生成任何令牌。 As in the HTML code given here if I send the Post request with authorization header as bearer and my directline key im able to generate the token (in Postman) , but unable to connect to my bot in webchat.此处给出的 HTML 代码一样,如果我发送带有授权标头的 Post 请求作为承载,并且我的直线密钥能够生成令牌(在 Postman 中),但无法在网络聊天中连接到我的机器人。 As mentioned here I have configured the directline also.正如这里提到的,我也配置了直达线路。 Any clarification would really be appreciated.任何澄清将不胜感激。

You need to enable enhanced authentication options present in Channels > Directline > Your Website option.您需要启用 Channels > Directline > Your Website 选项中的增强身份验证选项。 The problem is that directline isn't able to trust your origin to issue token as a result you aren't able to get the token.问题是 Directline 无法信任您的来源来颁发令牌,因此您无法获得令牌。

Here is the Image这是图像

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM