user2200620
user2200620

Reputation: 41

Bot work perfect on emulator but not in any channel

I wrote a bot using Bot Connector REST API from Microsoft Bot Framework and tested it via Bot Framework Emulator V3.5.25 on localhost and remotely with app id and app password, it work just perfect; but using Skype channel i can receive message on my endpoint but bot´s answer never reach to Skype user.

Incoming message from Skype user

{
    "text": "Hello bot?",
    "type": "message",
    "timestamp": "2017-03-03T19:08:30.988Z",
    "id": "1488568110992",
    "channelId": "skype",
    "serviceUrl": "https://smba.trafficmanager.net/apis/",
    "from": {
        "id": "29:1rILOvqsAlldnM1C4nK30sdjpveZezKC9LX5yYAvyi_k",
        "name": "Skype User"
    },
    "conversation": {
        "id": "29:1rILOvqsAlldnM1C4nK30sdjpveZezKC9LX5yYAvyi_k"
    },
    "recipient": {
        "id": "28:e20620eb-b214-4b02-8de1-c7fd14c11005",
        "name": "My_bot"
    },
    "entities": [{
        "locale": "es-ES",
        "platform": "Windows",
        "type": "clientInfo"
    }]
}

Outgoing message from my bot

{
"type": "message",
"text": "Bot is Ok",
"replyToId": "1488568110992",
"locale": "es",
"channelId": "skype",
"serviceUrl": "https://smba.trafficmanager.net/apis/",
"from": {
    "id": "28:e20620eb-b214-4b02-8de1-c7fd14c11005",
    "name": "My_bot"
},
"conversation": {
    "id": "29:1rILOvqsAlldnM1C4nK30sdjpveZezKC9LX5yYAvyi_k"
},
"recipient": {
    "id": "29:1rILOvqsAlldnM1C4nK30sdjpveZezKC9LX5yYAvyi_k",
    "name": "Skype User"
}
}

I don't receive a json payload response from the Bot Framework just this status: 400 Bad Request. Just for test purposes my bot sent a response with some missing parameters and the Bot Framework response with the same status and a json payload with an error message code and text.

I did not publish my bot, but according to Bot Framework docs, is not necessary.

I´m missing something? Anybody have an idea?

Thanks in advance.

Upvotes: 1

Views: 508

Answers (2)

user2200620
user2200620

Reputation: 41

Sorry, the problem is solved.

The bearer scheme was in bad format, instead of Bearer, had bearer.

Changed that and everything work.

Really sorry.

Upvotes: 1

Jyo Fanidam
Jyo Fanidam

Reputation: 1230

Yes, it is not required to be published for the skype bot to work. I'd like to suggest you few checkpoints and check if you have already tried them:

The Bot Framework Developer Portal contains a test panel where you can test the connection from the Bot Connector service to your bot. The security model used by the Bot Connector differs slightly from the security model used by the Emulator, and this is the most realistic step in testing your bot’s authentication.

Follow these steps to test your bot in the cloud with security enabled: Make sure your bot is deployed and running

  1. Log in to the Bot Framework Developer Portal, click on “My bots,” and if necessary, select the bot you want to debug from the list.
  2. Locate the test panel in the bottom-left corner of the screen and click the blue “Test” button. The results of the test appear just below the button.
  3. Please check the status of your bot on Skype Developer Portal.
  4. If the bot has status Pending Review. It looks like that bot will not work while the status is in "Pending Review". Check this screenshot. The bot is successfully registered only if it looks like this before publishing.

Let me know in details if you still have any issues.

Thanks

-Jyo

Upvotes: 1

Related Questions