I have developed a bot within Botframework and add the channel Microsoft Teams.
When user writes 'hi' in MS-Teams to the chatbot, my webhook receives the following message:
{
"text": "hi",
"textFormat": "plain",
"type": "message",
"timestamp": "2017-05-18T10:05:07.742Z",
"id": "1495101906391",
"channelId": "msteams",
"serviceUrl": "https://smba.trafficmanager.net/emea-client-ss.msg/",
"from": {
"id": "29:1hyY0WDlv1ehVaSqIA-anqB9CMHoukm59yNjxcVxjTnb5s2B1_HtUI6GFmS1vC6w2XufYPX7L03xlY1qEEQtT2w",
"name": "xxx"
},
"conversation": {
"id": "a:1ivnXQ6qsiT1hLo26tk4vL1vgUcanbkRm3mMsDj48HkQSKFwr87HCKUFvFoSqjMdGICUBYzds5MR1_kIBCJRY0GZyZ9fa3Yd3MXmlHUhLVA7XaXezOO5u7CaLTNghSiEM"
},
"recipient": {
"id": "28:4faa7ac7-bb35-4737-b49a-e21bbc3fb65d",
"name": "xxx"
},
"entities": [
{
"locale": "it-IT",
"country": "IT",
"platform": "Mac",
"type": "clientInfo"
}
],
"channelData": {
"tenant": {
"id": "5cf8dc9b-6f57-4eff-a404-5518dc1826d6"
}
}
}
In order to reply to user question, i'm using the following endpoint: https://smba.trafficmanager.net/emea-client-ss.msg/v3/conversations/29:1hyY0WDlv1ehVaSqIA-anqB9CMHoukm59yNjxcVxjTnb5s2B1_HtUI6GFmS1vC6w2XufYPX7L03xlY1qEEQtT2w/activities/
with body:
{
"action": "message",
"channelData": {
"tenant": {
"id": "5cf8dc9b-6f57-4eff-a404-5518dc1826d6"
}
},
"channelId": "msteams",
"conversation": {
"id": "a:1ivnXQ6qsiT1hLo26tk4vL1vgUcanbkRm3mMsDj48HkQSKFwr87HCKUFvFoSqjMdGICUBYzds5MR1_kIBCJRY0GZyZ9fa3Yd3MXmlHUhLVA7XaXezOO5u7CaLTNghSiEM"
},
"entities": [
{
"locale": "it-IT",
"country": "IT",
"platform": "Mac",
"type": "clientInfo"
}
],
"from": {
"id": "28:4faa7ac7-bb35-4737-b49a-e21bbc3fb65d",
"name": "XXX"
},
"id": "14950405460679",
"replyToId": "1495040546067",
"inputHint": "ignoringInput",
"locale": "it-IT",
"localTimestamp": "2017-05-17T17:02:25.716Z",
"recipient": {
"id": "29:1hyY0WDlv1ehVaSqIA-anqB9CMHoukm59yNjxcVxjTnb5s2B1_HtUI6GFmS1vC6w2XufYPX7L03xlY1qEEQtT2w",
"name": "XXX"
},
"serviceUrl": "https://smba.trafficmanager.net/emea-client-ss.msg/",
"text": "hi Antonio",
"textFormat": "markdown",
"type": "message",
"timestamp": "2017-05-19T17:02:25.716Z"
}
I receive a 400 error with the following body
{
"error": {
"code": "ServiceError",
"message": "Unsupported conversation type"
}
}
What is wrong about reply message? Are the endpoint and body correct?
Thanks in advance