12-15-2018 05:13 PM
I'm trying to use the POST /teams/{id}/channels/{id}/chatThreads API endpoint to post messages, however I'm experiencing the below problems. Does anybody have an idea what I may be doing wrong?
This sample below request demonstrates what I try with the timestamp and attachments (but here with an HTTPS, not data URL). The message gets created but with the mentioned defects.
{
"rootMessage":{
"createdDateTime":"2017-10-20T17:14:52.000Z",
"body":{
"contentType":"0",
"content":"Some message."
},
"attachments":[
{
"contentType":"image/png",
"contentUrl":"https://url-to-image",
"name":null,
"thumbnailUrl":null
}
]
}
}
Related, but without answers: https://techcommunity.microsoft.com/t5/Microsoft-Teams/Graph-API-Issues-while-creating-new-chat-thre...
Thank you in advance!
12-16-2018 10:37 AM - edited 12-16-2018 03:24 PM
4. I have a similar issue with creating threads in a name of a given user. I supply the user object with the correct ID but still the thread and message is created in the name of the user invoking the API request. The user supplied for the message doesn't "stick".
5. Is it possible that batching doesn't work for this endpoint? I get "Resource not found for the segment 'beta'." for firing such request in a batch, see below.
{
"requests":[
{
"method":"POST",
"url":"beta/teams/[team-id]/channels/[channel-id]/chatThreads",
"body":{
"rootMessage":{
"from":{
"user":{
"displayName":"User Name",
"userIdentityType":null
},
"guest":null
},
"createdDateTime":"2017-10-07T06:30:00.000Z",
"body":{
"contentType":"1",
"content":"blabla"
},
"attachments":null
}
},
"headers":{
"Content-Type":"application/json"
},
"id":"0"
}
]
}
I'm getting quite confused.
01-18-2019 03:13 PM
Nobody with any ideas? The linked thread confirms that attachments are not supported yet, but what about the others?
02-19-2019 11:15 AM
can you give a example on json payload for posting message with attachments for content type as file.
02-19-2019 11:41 AM
I've never got it working and as you can see from the above posts, it seems this isn't possible.