Chat API
Last updated
Last updated
The Chat API is what our own chat widget uses to interact with OpenDialog.
You can use this API to interact with OpenDialog through your own applications, enabling you to build complete custom front-ends.
There are three endpoints supported right now. Brief details are provided below and the API is documented .
GET webchat-config
- where you can retrieve configuration for how the interface should behave.
GET user/<user-id>/history
- where you can retrieve past messages for a given user
POST incoming/webchat
- where you post messages and receive the answer from OpenDialog
To have a conversation with an OpenDialog scenario you will typically start by sending a message with a callback_id of WELCOME - this is the default way that OpenDialog app gets started with conversations.
Following the trigger message you can send standard messages that contain the text that the user is saying.
Every time you change user_id
a new conversation will be started, but if you maintain the same user_id
you will continue the same conversation with the OpenDialog engine.