The Botpress Cloud dashboard provides you with an Analytics page with counters for the total number of users, new users, returning users, sessions and messages. It also shows a chart with the data and allows you to filter by date range. While this interface is great for understanding reach and engagement in a glance, you may need the data in a third-party service. Luckily, you can use the Botpress API to export the analytics data to your own database or system. Let’s see how to do it.Documentation Index
Fetch the complete documentation index at: https://botpress-ak-docs-20-document-updating-variables-from-outsid.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Making a request to the API
Send aGET request to https://api.botpress.cloud/v1/admin/bots/<your-bot-id>/analytics adding the following header: Authorization: Bearer <your-personal-access-token>.
NoteYou can find your personal access token in your Botpress Dashboard. Click your avatar and select “Personal Access Tokens”. Generate a new one and copy it.
getAnalytics.data.records), the result would look like this:
NoteIt’s a list of records containing the start and end date of the period, the number of returning users, new users, sessions and messages. With this information you can create your own charts and dashboards in your internal systems or favorite BI tool.