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