简体   繁体   English

有没有办法在使用图表 api 创建团队选项卡时开始对话

[英]Is there a way to start conversation when teams tab is created using graph api

I am creating a teams app where there is an option to create a new tab for collaboration for individual/group by providing details like tab display title, url etc After the tab is created, I would want to send some supporting message to describe about the tab.我正在创建一个teams app ,其中有一个选项可以通过提供选项卡显示标题、url 等详细信息来为个人/组创建一个new tab以进行协作创建选项卡后,我想发送一些支持消息来描述标签。

Right now there is button to start conversation .现在有按钮start conversation And when you click on button some prefilled text loads along with tab title.当您单击按钮时,一些预填充的文本会与选项卡标题一起加载。

Is there a way I can achieve this using graph api , so instead of clicking on start conversation button and getting the pre-filled message, I should be able to pass the supporting message via the graph api ?有没有一种方法可以使用graph api来实现这一点,所以我应该能够通过graph api传递支持消息,而不是单击开始对话按钮并获取预填充的消息?

Or Can we customize the message shown once you click the start conversation?或者我们可以自定义单击开始对话后显示的消息吗?

once you create a Tab in Team's channel via graph api you should get 201 as success with ID of new tab.通过图形 api 在团队频道中创建选项卡后,您应该使用新选项卡的 ID 成功获得 201。

HTTP/1.1 201 Created
Content-type: application/json

{
  "id": "794f0e4e-4d10-4bb5-9079-3a465a629eff",
  "displayName": "My Contoso Tab",
  "configuration": {
    "entityId": "2DCA2E6C7A10415CAF6B8AB6661B3154",
    "contentUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/tabView",
    "websiteUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154",
    "removeUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/uninstallTab"
  },
  "sortOrderIndex": "20",
  "webUrl": "https://teams.microsoft.com/l/channel/19%3ac2e36757ee744c569e70b385e6dd79b6%40thread.skype/tab%3a%3afd736d46-51ed-4c0b-9b23-e67ca354bb24?label=my%20%contoso%to%tab"
}

Then you can create conversation like below然后您可以创建如下对话

POST https://graph.microsoft.com/v1.0/groups/29981b6a-0e57-42dc-94c9-cd24f5306196/conversations
Content-type: application/json

{
    "topic": "Take your wellness days and rest",
    "threads": [
        {
            "posts": [
                {
                    "body": {
                        "contentType": "html",
                        "content": "Contoso cares about you: Rest and Recharge"
                    },
                    "newParticipants": [
                        {
                            "emailAddress": {
                                "name": "Adele Vance",
                                "address": "AdeleV@contoso.onmicrosoft.com"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}

Ref articles 参考文章

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

相关问题 Microsoft Teams 频道 email 地址、SharePoint 和使用 Graph 创建团队时文件不可访问 Api - Microsoft Teams channel email address, SharePoint and files are inaccessible when the team is created using Graph Api 使用图形 API 错误添加团队规划器选项卡 - Teams planner tab add using graph API error 使用图形添加 MS Teams 网站选项卡 API 错误 - Add MS Teams website tab using graph API error MS Teams 频道在由 MS Graph API 请求创建时被隐藏 - MS Teams channel is hidden when created by MS Graph API request 使用 Microsoft Graph API 列出包含团队的组时,过滤器不起作用 - filter is not working when using Microsoft Graph API to List Groups with Teams 使用 Microsoft 图形 API 时创建团队团队错误 - Create a teams team error when using Microsoft graph api 如何使用 Graph API 和 PowerShell 将 OneNote 笔记本选项卡添加到 Teams 频道? - How to add a OneNote notebook tab to Teams channel using Graph API and PowerShell? 我们可以在不使用网站选项卡的情况下借助 Graph API 将 Sharepoint 站点的组列表附加到 Microsoft Teams 选项卡中吗 - Can we attach Sharepoint Site's List of a Group into Microsoft Teams Tab with the Help of Graph API without using website Tab 通过图形创建团队时出现错误请求或冲突 API - BadRequest or Conflict when Create Teams by Graph API 使用 Graph API 将成员添加到 MS Teams - Add a member to MS Teams using Graph API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM