I'm trying to create my own bot in microsoft bot framework,it is asking the messaging endpoint in bot,what exactlty is this endpoint?
Your messaging endpoint is the endpoint where messages will be sent to your bot.
A bot is just a web service. More specifically, a bot is an api that accepts posted messages. Like any service, your bot needs to be hosted somewhere.
You create a bot using the bot builder SDK (Node or C#) and deploy that code somewhere (could be Azure, could be AWS, could be on-premises). In your bot code you specify the route where messages will be sent to your bot (see node example below).
server.post('/api/messages', connector.listen());
The botbuilder samples all use '/api/messages' as the route, so if you host your bot on samplebot.azurewebsites.net, then your messaging endpoint would be samplebot.azurewebsites.net/api/messages. However, you can make the route whatever you want.
Note: to register your bot you don't actually need to enter an endpoint - you can always add it later.
The messaging endpoint is the url where the messages, send to your bot, will arrive. It's the path to your sever where the code of your bot is hosted.
A endpoint url can look like this:
https://example.com/api/v1/botmessage
It routes to my server where the code is hosted and performs a post.
And here arrives the post with the message:
app.post('/api/v1/botmessage', connector.listen());
As you can see the connector starts to listen when a message comes in.
If there is something not clear, please ask me.
Related
I am new to Azure Bot Framework Composer.
I am creating chatbot using Azure Bot Framework Composer(without writing code) which need to be launch in Angular Web Application from Azure Cloud after deployment.
In my chatbot project, need to fetch the user conversation data and send it to backend API from Azure Bot Framework Composer.
How to achieve this?, anyone help on this.
You can view the conversation data using ${conversation} scope and from dialog stack can access required information. To get last conversation data can use ${turn.Activity}. For sending to backend API, create HTTP post method and pass the data in the body of your request.
Without knowing more details on your chatbot project, one reasonable approach to take is to use the Send HTTP Request action in the composer.
After you obtain the values from the conversation that you are looking for, (can be stored in conversation / dialog variables), you could then pass it onto an HTTP send request and deliver that to your backend API.
With this, you can send any payload to your backend API.
I am facing issue with azure chat-bot framework SDK4 integration with live agent(human) chat through REST API using Node.js.
I have an REST API, which needs to execute in the certain interval
for getting information about human agent chat and status, and i need
to send to user as an chat message.
One more REST API, which will send chat message again again to live agent from user.
I am trying to implement this in azure chat-bot SDK V4 waterfall method getting messages status shows 'can't send, retry', even though it received from live agent side.
Code already in stack overflow:
azure chatbot SDK4 - live(human) agent chat REST API integration not working issue
Here you go --> echo bot this sample will explain listen for the incoming requests to bot.
Please,
I am testing my hello world bot in Azure web chat. This bot was ok in bot emulator, and was published (from BB SDK V4) without any issue. I`m already checked:
messaging endpoint url.
app ID
app password
name of app
I just receive a couldnt send retry` message.
What can be going on with my IcidHelloWorldBot? Any other information which I can post here?
I have an external service with is own database where the users can log in.
Now I have a bot in NodeJS using Bot Builder and the Bot Framework.
I want to link them.
Is there anyway that the bot recognize the users from the other service everytime they open a new conversation and everytime they write something in the bot?
I've just tried with web chat before and I know that with channels that they support like Facebook, Telegram, Skype etc is easy to recognize the users every time they come back, but I don't know how if it is possible to do this with an external service where the users are already logged in and they want to talk with the chatbot.
I don't know how could I generate an authtoken or something that the bot framework read it and recognize the user.
You can use the DirectLine API to allow your bot and a custom client to communicate to each other, a sample can be found here, and here if you want to use WebSockets.
You can also add authentication to your bot via Azure Bot Service to use OAuth as stated here, where you will find samples too.
I'm able to get conversation details for webchat using https://webchat.botframework.com/api/conversations/[conversationId]/messages
Service URL for skype channel is https://skype.botframework.com, but I dont find any documentation for getting conversation details
You can use the DirectLine Rest API (see docs).
The Direct Line API is a simple REST API for connecting directly to a single bot. This API is intended for developers writing their own client applications, web chat controls, mobile apps, or service-to-service applications that will talk to their bot.
Within the Direct Line API, you will find:
An authentication mechanism using standard secret/token patterns
The ability to send messages from your client to your bot via an HTTP POST message
The ability to receive messages by polling HTTP GET
A stable schema, even if your bot changes its protocol version
You need to enable the DirectLine channel for your bot on (see screenshot)
You don't have to access each specific channel endpoint separately, you can do it all (with some limitations) through the DirectLine API.
Start a New Conversation
POST /api/conversations
Get Messages in a Conversation
GET /api/conversations/{conversationId}/messages
Send a Message
POST /api/conversations/{conversationId}/messages
The full details are in the docs as linked above.
Hope this helps
Can you be more specific about conversation details and what you're looking for?
Generally, you shouldn't assume those URL's are static BTW; an incoming message from the Bot Framework will have a ServiceURL that should be used for the life of that conversation. Some services may have multiple ServiceUrl's that they give out for different users.