Chat API
Introduction
The Chat API is an HTTP-based API that allows you to interact with a Botpress bot through a backend. It is similar to the Webchat API, but it is designed to be used by backend services.
Setup and Configuration
To use the Chat API, you must install the @botpress/chat
package. You can do this by running the following command:
npm install @botpress/chat
You'll need to provide the Webhook URL
in the integration configuration where the Chat API will send the messages and events. This URL must be a public URL accessible from the internet.
You can also configure the Webhook Secret
to secure the communication between your backend and the Chat API. This secret will be used to make API requests to the Chat API.
Demo
You can take a look at the following demo to see how the Chat API works:
Also, the NPM Package (opens in a new tab) has a few examples on how to use the Chat API.