简体   繁体   English

从通过 MSTeams Graph API 发布的自适应卡获取用户提交的输入数据的问题

[英]Issue on getting the user submitted input data from Adaptive card posted via MSTeams Graph API

We are facing issue on getting the user submitted input data from Adaptive card posted via MSTeams Graph API.我们在从通过 MSTeams Graph API 发布的自适应卡中获取用户提交的输入数据时面临问题。 We have a Team Channel that has two members:Global Admin and the user.我们有一个团队频道,它有两个成员:全局管理员和用户。 We posted the following Adaptive card using Global Admin token.我们使用全局管理员令牌发布了以下自适应卡片。

{
        "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
        "type": "AdaptiveCard",
        "version": "1.3",
        "body": [
            {
                "type": "TextBlock",
                "text": "Specify the type of text being requested:"
            },
            {
                "type": "Input.Text",
                "id": "myComment",
                "label": "style: text"              
            }
        ],
        "actions": [
            {
                "type": "Action.Submit",
                "title": "OK",
                "data":{
                    "type":"submit"
                }            
            }
        ]
    }

We have a subscription for resource /teams/${teamId}/channels/${channelId}/messages with changeType as 'created'我们订阅了资源/teams/${teamId}/channels/${channelId}/messages ,其中 changeType 为“已创建”

When the user clicks the 'OK' button we are not receiving any event in the subscribed end point.当用户单击“确定”按钮时,我们在订阅的端点中没有收到任何事件。

Is there any other resource, changeType need to be added or we need to listion ant other particular event from MSTeams to get the user submitted values?是否有任何其他资源,需要添加 changeType 或者我们需要从 MSTeams 列出 ant 其他特定事件以获取用户提交的值?

Please help us to resolve the issue.请帮助我们解决问题。

Regards, Raja问候, 拉贾

It is not possible to get Adaptive card input with subscriptions.订阅时无法获得自适应卡片输入。 Instead you can have a Bot having teams as a scope in manifest, which will send an adaptive card and you can get the input from there.相反,您可以让 Bot 在清单中拥有像 scope 一样的teams ,这将发送一张自适应卡,您可以从那里获取输入。 That is much easier.那容易得多。

We have sample created in c_sharp, here is the link我们在 c_sharp 中创建了示例,这是链接

https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore

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

相关问题 提交用户输入后如何更改自适应卡? - How do I change the Adaptive card once the user input is submitted? “IsRequired”不适用于 MsTeams 中自适应卡的 Input.Text - "IsRequired" not working for Input.Text of Adaptive Card in MsTeams 通过 API 获取 MSTeams Teams 使用数据 - Get MSTeams Teams Usage data via API [MsTeams][BotFrameworkV4][Adaptive Card] 团队中可滚动的自适应卡 - [MsTeams][BotFrameworkV4][Adaptive Card ] Scrollable Adaptive card in teams MSTeams:自适应卡片标题空间文本 - MSTeams: Adaptive card header space text 如何使用 c# 代码删除 MSteams 中发布的自适应消息 - how to delete the posted adaptive messge in MSteams using c# code 是否有任何图形 API 来更新 msteams 中的用户状态? - Is there any graph API to update the user's status inside msteams? 如何通过 Microsoft Graph API/SDK 向 Microsoft 团队发送自适应卡片? - How to send a Adaptive card to Microsoft teams via Microsoft Graph API/SDK? 通过 Microsoft Graph API 发送自适应卡 - 获取提交操作时出错 - Send an adaptive card through Microsoft Graph API - Error when getting Submit Action 是否可以使用自适应卡格式通过Graph API在Microsoft Teams Channel中创建消息(似乎仅限于文本和HTML) - Is it possible to create a message in a Microsoft Teams Channel via Graph API using an Adaptive Card format (seems limited to Text and HTML)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM