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

The To Address refers to [email protected] which is not a known

Open vaditya04 opened this issue 10 years ago • 10 comments

Received the above exception when trying to start a conversation by sending a message from the bot to a Skype user.

            var connector = new ConnectorClient();
            var message = new Message
            {
                From = new ChannelAccount() {ChannelId = "Skype", Address= "ChatBotName", IsBot = true, Name = "ChatBotName"},
                To = new ChannelAccount() {ChannelId = "Skype", Address = "[email protected]"},
                Text = "Hi",
                Language = "en"
            };

vaditya04 avatar Jun 19 '16 11:06 vaditya04

+1 The same issue with skype nickname in address field using REST API

yauhenininjia avatar Jun 20 '16 20:06 yauhenininjia

There should be a way to permanently add a Skype user to 'Known' so the bot can connect to him on it's own. I don't think it has been done yet. Would appreciate a dev suggesting some sort of workaround for this.

vaditya04 avatar Jun 21 '16 09:06 vaditya04

I got same problem address not shown proper its like encrypted address in skype bot please help

inornos avatar Jun 21 '16 13:06 inornos

  1. ChannelId should be "skype" in lower cases
  2. the addresses need to be the internal addresses which you receive when talking to skype. They should look something like "8:12313123123"
  3. You can only talk to a user that you have previously received a message from (and you have to use the address that skype has sent for that user to communicate with them.

tomlm avatar Jun 21 '16 17:06 tomlm

@tomlm When I write to bot from skype client I get params on my server in the next form: {"_json"=>[{"id"=>"0", "content"=>"hi", "activity"=>"message", "from"=>"8:my_skype_nickname", "fromDisplayName"=>"my_skype_name", "to"=>"28:my_bot_id", "time"=>"2016-06-21T19:20:31.230Z"}], "message"=>{"_json"=>[{"id"=>"0", "content"=>"hi", "activity"=>"message", "from"=>"8:my_skype_nickname", "fromDisplayName"=>"my_skype_name", "to"=>"28:my_bot_id", "time"=>"2016-06-21T19:20:31.230Z"}]}}

After that I swap from and to fields and send reply to https://api.botframework.com/bot/v1.0/messages and get following error: Exception: 404 Resource Not Found: { "error": { "code": "NotFound", "message": "The To Address refers to 8:my_skype_nickname which is not a known", }

But if I send next params to https://api.botframework.com/bot/v1.0/messages they come to server in the next form: {"type"=>"Message", "id"=>"xxxxxxxxxxx", "conversationId"=>"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created"=>"2016-06-21T19:40:55.0354771Z", "language"=>"en", "text"=>"You wrote at 2016-06-20 06:30:27 UTC: hi", "attachments"=>nil, "from"=>{"name"=>"8:my_skype_nickname", "channelId"=>"skype", "address"=>"8:my_skype_nickname", "id"=>"xxxxxxxxxxx", "isBot"=>false}, "to"=>{"name"=>"my_bot_name", "channelId"=>"skype", "address"=>"my_bot_id", "id"=>"my_bot_name", "isBot"=>true}, "participants"=>[{"name"=>"8:my_skype_nickname", "channelId"=>"skype", "address"=>"8:my_skype_nickname", "id"=>"xxxxxxxxxxx", "isBot"=>false}, {"name"=>"my_bot_name", "channelId"=>"skype", "address"=>"my_bot_id", "id"=>"my_bot_name", "isBot"=>true}], "totalParticipants"=>2, "mentions"=>nil, "channelConversationId"=>"xxxxxxxxxxxx", "hashtags"=>nil, "message"=>{"type"=>"Message", "id"=>"xxxxxxxxxxx", "conversationId"=>"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "created"=>"2016-06-21T19:40:55.0354771Z", "language"=>"en", "text"=>"You wrote at 2016-06-20 06:30:27 UTC: hi", "attachments"=>nil, "from"=>{"name"=>"8:my_skype_nickname", "channelId"=>"skype", "address"=>"8:my_skype_nickname", "id"=>"xxxxxxxxxxx", "isBot"=>false}, "to"=>{"name"=>"my_bot_name", "channelId"=>"skype", "address"=>"my_bot_id", "id"=>"my_bot_name", "isBot"=>true}, "participants"=>[{"name"=>"8:my_skype_nickname", "channelId"=>"skype", "address"=>"8:my_skype_nickname", "id"=>"xxxxxxxxxxx", "isBot"=>false}, {"name"=>"my_bot_name", "channelId"=>"skype", "address"=>"my_bot_id", "id"=>"my_bot_id", "isBot"=>true}], "totalParticipants"=>2, "mentions"=>nil, "channelConversationId"=>"xxxxxxxxxxxx", "hashtags"=>nil}}

And skype user becomes known. Will be this problem fixed in the future and what should I do now?

yauhenininjia avatar Jun 21 '16 19:06 yauhenininjia

@tomlm When you say 'previously messaged', do you mean in the same conversation? If I talked to a chat bot instance once through Skype, can I indefinitely reach out from that bot to the Skype user in the future? Or does it have to be the same conversation, same instance of the bot?

vaditya04 avatar Jun 21 '16 21:06 vaditya04

@vaditya04 , yes, that's right...once you have established a relationship with a user, you can create new conversations with that user. You cannot arbitrarily send a message to a user who has never sent you one.

tomlm avatar Jun 21 '16 21:06 tomlm

@tomlm Any advice for message above?

yauhenininjia avatar Jun 22 '16 20:06 yauhenininjia

hm...@yauheninjia, we are close to a new release which re-architects this stuff. I would sit tight

tomlm avatar Jun 23 '16 00:06 tomlm

@tomlm So when will be this release?

yauhenininjia avatar Jun 28 '16 12:06 yauhenininjia