botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

getting error - failed: [400] Bad Request while sending message on skype from web chat/Emulator

Open SurabhiKandi opened this issue 9 years ago • 6 comments

Hi,

My question is - i am trying to send message from bot using web chat to particular user on skype (Using conversation Id) its giving me error same for Emulator , Microsoft Teams but when i am sending message from bot using skype platform to particular user on skype its working and its only working when the platform is same. and one more question i am unable to get user reply to my bot when its working with skype platfrom.

Can anyone plz help me ? Thanks in advance.

SurabhiKandi avatar Mar 15 '17 11:03 SurabhiKandi

Can you share the exact error, and details of what you are trying to do and how you are doing it?

carlosscastro avatar Mar 15 '17 17:03 carlosscastro

I want to ping user from my bot , i am using web chat channel . My user is on skype and Bot is added to user's contacts list. Its like sending message from bot to my user's skype .

one more question is that necessary while sending message to particular user the From field and To field need to be on same channel ?

I am doing this - var msg = new builder.Message().address({ id: "1466182688092", channelId: "skype", serviceUrl: session.message.address.serviceUrl, useAuth: true, to: { id: "29:1cJLt2rNGzi9QUJqYSVRBbPQLyhuS8qKaUJJ2WikGwp8", name: "user name", isBot: false }, conversation: { id: "29:1cJLt2rNGzi9QUJqYSVRBbPQLyhuS8qKaUJJ2WikGwp8" }, from: { id: "Poke_bot@6hkfxqchODc", name: "MyBot", isBot: true } }).text("Here is user question ");

Issue - Error: Request to 'https://webchat.botframework.com/v3/conversations/29%3A1cJLt2rNGzi9QUJqYSVRBbPQLyhuS8qKaUJJ2WikGwp8/activities' failed: [400] Bad Request

SurabhiKandi avatar Mar 16 '17 06:03 SurabhiKandi

any update ?

SurabhiKandi avatar Mar 27 '17 07:03 SurabhiKandi

The From, Conversation and Recipient fields all need to be expressing ChannelAccounts in the target channel.

So to talk cross channel you need to know the From, Converation, Receipient AND serviceUrl of the target channel, then call the serviceUrl passing the activity built using those values.

Note: Please only submit Bot Builder SDK bugs here. If you have general questions or implementation issues, please submit a question on Stack Overflow at http://stackoverflow.com/questions/tagged/botframework.

tomlm avatar Mar 30 '17 16:03 tomlm

@tomlm I have the same error with a similar issue; When I test my bot on Slack using ngrok, I get a "400 bad request".

https://github.com/Microsoft/BotBuilder/issues/3203

Could you please help?

mahmoudahmedarafa avatar Jul 26 '17 14:07 mahmoudahmedarafa

@mahmoudahmedarafa You are commenting on a closed issue.

If you have a question or problem, please open a new issue.

nwhitmont avatar Aug 04 '17 02:08 nwhitmont