M.T
M.T

Reputation: 63

Why can't I connect to my bot framework using the end point API

Hello I'm currently trying to set up the bot framework from Microsoft, so I can call this from my REST API.

I created the bot framework using the portal from Microsoft and integrated LUIS into it. This part is not the problem, but when I try to call the end API I get 401 unauthorized with the message "BotAuthenticator failed to authenticate incoming request!". I tried this in Postman and CURL and both give the same response.

I've been searching on the web and saw that you need to pass a bearer token in the header. For this I used the login services from Microsoft and successfully got a token from it.

Even with this token in the header I keep getting the same response. I also tried using the bot emulator from Microsoft with the same Microsoft ID and Password, but here it seems to work.

Am I forgetting something important or do I have to change some settings in order to make this work outside the bot emulator?

Upvotes: 1

Views: 406

Answers (1)

Genady
Genady

Reputation: 26

You usually talk to your bot through one of the available channels and not directly to the bot implementation. If you want to talk to your bot through a REST API, you would need to use the Direct Line API. Did you enable the Direct Line Channel? Please have a look at the samples here - https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-concepts

Upvotes: 1

Related Questions