Microsoft Skype bot的消息传递Webhook [英] Messaging Webhook for Microsoft skype bot

查看:238
本文介绍了Microsoft Skype bot的消息传递Webhook的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设置一个Microsoft Skype机器人,并且希望它能够将消息发布到个人聊天和群组聊天.我在 https://developer.microsoft.com/zh- us/skype/bots/manage ,并选中了消息传递"复选框,但是有一个消息传递Webhook"字段,其中显示将聊天消息和内容发送到的HTTPS URL.如果您具有聊天功能,则为必填".我在这个领域要做什么?没有明显的帮助链接.我需要设置一个Azure网站吗?

I'm setting up a Microsoft Skype bot, and I want to be able to have it post messages to individual and group chats. I have added a bot at https://developer.microsoft.com/en-us/skype/bots/manage and checked the Messaging checkboxes, but there's a field for "Messaging Webhook", which says "The HTTPS URL to send chat messages and content to. Required if you have a chat capability". What do I put in this field? There's no obvious help link. Do I need to set up an Azure website?

推荐答案

Node.js解决方案:

Solution for Node.js:

如果要在本地测试bot,则需要遵循https://62a8271e.ngrok.io/api/calls.

If you want to test your bot locally, you need to follow the instructions for ngrok described in the comments of this example and this guide. Once you run ngrok, you will obtain a HTTPS URL such as https://62a8271e.ngrok.io. You then need to append /api/calls to this URL, i.e. the webhook URL you need to enter in the Skype channel configurations and as environment variable "CALLBACK_URL" would be https://62a8271e.ngrok.io/api/calls.

如果要在全球范围内测试机器人并将其部署为Azure Web应用程序,则需要用机器人URL替换ngrok URL,即URL的外观应类似于https://yourbot.azurewebsites.net/api/calls.别忘了也将该URL作为环境变量添加到您的Web应用程序设置中.

If you want to test your bot globally and you have deployed it as an Azure web app, you need to replace the ngrok URL with your bot URL, i.e. the URL should look something like https://yourbot.azurewebsites.net/api/calls. Don't forget to add this URL as an environment variable in your web app settings as well.

这篇关于Microsoft Skype bot的消息传递Webhook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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