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);
});