PERSONAL_ACCESS_TOKEN
const botId = '<your-bot-id>' // Replace with your actual bot ID (found in the Studio URL) const botpressApiUrl = 'https://api.botpress.cloud/v1/chat/conversations' const botpressApiKey = env.PERSONAL_ACCESS_TOKEN const response = await axios.get(botpressApiUrl, { headers: { Authorization: `Bearer ${botpressApiKey}`, 'x-bot-id': botId } }) // Optional: Log the list of conversations console.log(response.data) response.data.conversations.forEach((conversation) => { const conversationId = conversation.id client.createMessage({ conversationId, userId: botId, tags: {}, type: 'text', payload: { text: "Don't forget to drink water!", // Your reminder message }, }) })
botId
https://studio.botpress.cloud/THIS_IS_YOUR_BOT_ID/
Was this page helpful?