I was trying to send a JSON stringified object or an attachment through the session using session.send
, I got the following error in the console and do not get any response from the bot.
Error: Request to 'https://smba.trafficmanager.net/apis/v3/conversations/SOMEHASHCODE/activities' failed: [400] Bad Request
When I checked the Skype channel issues in Microsoft Bot Framework, I see the following message for JSON objects
Invalid XML in message text
and the following message for attachments.
Unknown attachment type
The bot is working perfectly in Slack and Emulator. So it must not be the issue with the code.
// JSON object
session.send(JSON.stringify(session.conversationData.inputData, null, 2));
// Attachment message
session.send(new builder.Message(session)
.text(`Here's the document:`)
.addAttachment({
contentUrl: `http://host:port/${filePath}`,
contentType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
name: 'Document.docx',
}));
The JSON object which was sent was {"name": "Philip John", "id": "444411111111", "phone": "54545454", "email": "[email protected]", "address": "Street 11 - 111, City , ", "job": "Software Tester", "date": "1st June 2017", "salary": "9000", "bankAccount": "DE121231231231231231" }
Any idea how to tackle this issue?