I'm using the Microsoft Botframework and the node.js version of botbuilder. My bot can send messages to kik (and other services) using the shared message fields - the ones that the botconnector allows for all messages.
However, when I try to use channelData fields for kik, I get a 400 (Bad Request) error message. I have already adapted my message to use the tip from: Bot Connector: Sending custom message to Kik results in 400 error but I'm still missing something.
Thanks for any help on mapping the message properly for kik.
Code that results in the 400 error:
session.send({
type: "Message",
to: { "channelId":"kik", "address": session.message.from.address},
from: { "channelId":"kik", "address": session.message.to.address},
replyToMessageId: session.message.id,
conversationId: session.message.conversationId,
channelConversationId: session.message.channelConversationId,
channelMessageId: session.message.channelMessageId,
channelData:
{
"messages": [
{
"chatId": session.message.channelConversationId,
"type": "text",
"to": session.message.from.name,
"text": "test text",
"noForward": true
}
]
}
});
I've also tried sending only the channelData portion, but that also results in the 400 error:
channelData:
{
"messages": [
{
"chatId": session.message.channelConversationId,
"type": "text",
"to": session.message.from.name,
"text": "test text",
"noForward": true
}
]
}