https://discord.gg/botpress logo
unsupported message type when using api to create ...
# 🤝help
g
i am sending a virtual message from the botpress client into a conversation with my bot for my bot to query the knowledge base, but the bot cant see the message in the channel, therefore it skips the kb agent. i can see it when looking in the 'conversations' tab in the workspace. it says: 'unsupported message type' also for some reason my bot can see the transcript but not {{event.preview}}. the code that i used: import axios from 'axios'; const options = { method: 'POST', url: 'https://api.botpress.cloud/v1/chat/messages', headers: { accept: 'application/json', 'x-integration-id': '87b01760-ede8-49d5-afc6-6afc0d0d1bdb', 'x-bot-id': '73a2700e-f938-4dc7-a362-6877ca2ab4c1', 'content-type': 'application/json', authorization: 'Bearer bp_pat_R0TvhpZny0m6IgK9GLfJF1n6g2C3b5dTDuTL' }, data: { payload: {type: 'text', content: 'what do you offer?'}, tags: {'webchat:id': 'ca3f3bbe-da70-4222-85be-380461f3dd0c'}, userId: 'user_01J1TCGS48BBDWR8V30MZFYPD5', conversationId: 'conv_01J1TCGS0J5VA4Z4T2G4BN9XBE', type: 'text' } }; axios .request(options) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.error(error); }); https://cdn.discordapp.com/attachments/1259858717793321073/1259858718317744169/Screenshot_2024-07-08_at_14.00.33.png?ex=668d365d&is=668be4dd&hm=39e551731f400014c9942467d75a8f975a2ce4d071e9646e0249f17699e07c85& https://cdn.discordapp.com/attachments/1259858717793321073/1259858718955405342/Screenshot_2024-07-08_at_14.00.56.png?ex=668d365d&is=668be4dd&hm=8b2da7fe5a083469b55821932f2eba60ee584b5e83c884428591690ded685fe5&