BotBuilder-MicrosoftTeams - 在 "node app.js" 之后无法获得 "hello" 的任何响应

BotBuilder-MicrosoftTeams - unable to get any responses with "hello" after "node app.js"

我正在处理这个示例项目,我对此完全陌生并且花了 3 天时间几乎没有提供任何文档:https://github.com/OfficeDev/BotBuilder-MicrosoftTeams/tree/master/Node/samples 我们公司希望在 Teams 中主动向用户发送消息,因此我认为这将是一个很好的起点。

第1步:我运行npm install安装了"botbuilder": "^3.16.0"

第 2 步:我在 package.json 所在的 /Node 和 npm install botbuilder-teams --save 中都做了 npm install botbuilder-teams --save /Node/samples -> 我在这里复制了 package.json 因为我不确定需要从哪里安装 npm 模块 所以我又一次让 Node/package.jsonNode/samples/package.json 都安装了相同的模块集。

步骤 3:来自 cd Node/samplesnode app.js 我从浏览器转到:http://localhost:3978/ 并得到 {"code":"ResourceNotFound","message":"/ does not exist"}

在模拟器中,我转到 http://localhost:3978/ 并输入 hello,但没有收到任何响应

我怀疑这是我的问题所在:

// Put your registered bot here, to register bot, go to bot framework
var appName = 'app name';
var appId = 'app id';
var appPassword = 'app password';
var userId = 'user id';
var tenantId = 'tenant id';

where do I get the password, is it the same as the secrets in the azure portal?

我想运行这个在本地,所以不部署在 Azure 我正在使用 ngrok,正如您在附加的终端图片上看到的那样,暂时在本地托管应用程序。

当您转到 https://dev.botframework.com/bots/new 并创建您的机器人时,没有地方可以设置 password 遗留 UI 用于显示我在 youtube 上看到的视频。

Why am I not getting ANY responses?

提前致谢!

根据您提供的代码,您应该使用此 URL 在本地测试此示例:

http://localhost:3978/api/v1/bot/messages

您可以在 Azure AD 中创建应用密码:

如果你刚开始使用nodejs bot,this guide会更好更详细