https://discord.gg/botpress logo
Hi everyone, i am working on chat api. When i crea...
# 💻developers
n
Hi everyone, i am working on chat api. When i create a conversation through api i dont see that conversationId on UI. I see differant one? but same chat. This is conversationId conv_01M5V6YI1O61Z71FIWSGE i create here is conversationId on UI conv_01JHG420X1EV6AYMY3ED2V9FN5 why these are differant how can i get correct id? > async createConversation(userId) { > try { > const url = `https://chat.botpress.cloud/${config.botpress.webhookId}/conversations/get-or-create`; > > // Generate ID in Botpress format > const timestamp = Date.now().toString(36).toUpperCase(); > const random = Math.random().toString(36).substring(2, 15).toUpperCase(); > const conversationId = `conv_01${timestamp}${random}`; > > const response = await axios.post( > url, > { > id: conversationId, > }, > { > headers: { > "x-user-key": config.botpress.userKey, > }, > } > ); > > return response.data; > } catch (error) { > console.error("Error creating conversation:", error); > throw error; > } > }
4 Views