BOT框架 - 从我的应用程序服务DirectLine API生成直接令牌无效

发布于 2025-02-11 09:46:54 字数 986 浏览 2 评论 0 原文

我创建了一个机器人(C#),并尝试使用DirectLine将其连接到Webchat。 I referred this here GitHub repo并尝试使用DirectLine令牌将我的机器人连接到Webchat。但是,此直线扩展名> https://myappservicename.azurewebsites.net/directline/token如果我发送邮政请求,则不会生成任何令牌。如在给定的html代码中,在这里如果我以授权标题发送邮政请求作为持有人,我的直线密钥可以生成令牌(在邮递员中),但无法连接到我的bot在Webchat中。如前所述在这里我也配置了直线。任何澄清都将不胜感激。

I have created a bot(c#) and trying to connect it to webchat using directline. I referred this here github repo and trying to connect my bot to webchat using directline token. but this directline extension >https://myappservicename.azurewebsites.net/directline/token won't generate any token if i send a post request. 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. As mentioned here I have configured the directline also. Any clarification would really be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜雨飘雪 2025-02-18 09:46:54

您需要启用频道中存在的增强身份验证选项> Directline>您的网站选项。问题在于,直线无法相信您的原点来发出令牌,因此您无法获得令牌。

这是图像

You need to enable enhanced authentication options present in Channels > Directline > Your Website option. 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.

Here is the Image

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文