如何使用Azure功能通过各种渠道向用户发送主动通知/广播消息? [英] How to send proactive notification/ broadcast message using Azure Functions to user using various channels?

查看:63
本文介绍了如何使用Azure功能通过各种渠道向用户发送主动通知/广播消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要通过Microsoft Bot V4向在特定时间安排的用户发送主动通知.我不确定如何进行此操作.

I need to send proactive notification to the user that is scheduled at a certain time via Microsoft Bot V4. I am not exactly sure how to proceed with this.

当前,我正在尝试使用Azure Function向用户发送主动消息,但是,我不确定在bot服务和azure函数之间使用什么连接.我看了Direct Line,但对我来说不清楚.

Currently, I am trying to use Azure Function to send proactive message to user however, I'm not sure what to use to connect between bot service and azure functions. I looked at Direct Line but its not clear for me.

目前,我能想到的最佳方法是使用Azure Function和Direct Line向用户发送主动通知.

Currently, the best approach I can think of is to use Azure Function and Direct Line to send proactive notification to users.

我通过邮递员测试了Directline API,但没有用.它说找不到对话ID.

I tested directline API via postman but it didn't work. It says conversational ID not found.

https://directline.botframework.com/v3/directline/conversations/{conversationId}/activities

JSON POST

JSON POST

{
    "type": "message",
    "from": {
        "id": "user1"
    },
    "text": "hello"
}

邮件发送后,应该给我ID.

After the message is sent it should give me the ID.

{
    "id": "0001"
}

我设法了解Direct Line的问题.它不允许我向Web聊天等不同渠道或Skype上的漫游器发送消息.还有其他选择可以在Skype上向我的用户发送消息吗?

I managed to understand my issue with Direct Line. It doesn't allow me to send a message to DIFFERENT channel, like Web Chat or to bot on Skype. Is there any other option to send message to my user on Skype ?

推荐答案

好的,所以我解决了我的问题.通过使用REST连接器

Okay so I sorted out my problem. By using REST connector https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-connector-authentication?view=azure-bot-service-4.0 I think I just made big assumption that I have to use Direct Line

我可能没有清楚解释我的真正问题是什么.感谢您的答复!

I maybe did not explain clear what my problem really was. Thanks for the replies !

这篇关于如何使用Azure功能通过各种渠道向用户发送主动通知/广播消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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