Forum Discussion
beepboop
Sep 09, 2021Copper Contributor
Add a Channel mention to an adaptive card
All, Using the beta version of the API, https://docs.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http, I'm able to use graph to send a team mention to a channel and I'...
ChetanSharma-msft
Microsoft
Sep 09, 2021beepboop - Could you please share the error log details for your issue.
beepboop
Sep 10, 2021Copper Contributor
I've attempted to build a JSON script to perform this action:
{
"importance":"high",
"subject":"This is a mention",
"body":{
"contentType":"html",
"content":"Text goes here. <br/> <at id ='0'></at> <br/><br/>"
},
"mentions":[
{
"id":0,
"mentionText":"",
"mentioned":{
"conversation":{
"id":"0",
"displayName":"teamName",
"conversationIdentityType":"team"
}
}
}
],
"attachments":[
{
"id":"randomKey",
"contentType":"application/vnd.microsoft.card.thumbnail",
"contentUrl":null,
"content":{
"title":"Test title",
"text":"textgoes here",
"buttons":[
{
"type":"openUrl",
"title":"Button",
"value":"https://microsoft.com"
},
{
"type":"openUrl",
"title":"Button2",
"value":"https://google.com"
}
]
},
"name":null,
"thumbnailUrl":null
}
]
}The error I receive is:
Method failed: (/beta/teams/) with code: 400
{"error":{"code":"BadRequest","message":"Invalid request body was sent.",