Hey there, I use Rasa X 0.35.0 and a website with my chatbot on it. Sending user responses to my rasa server works perfectly with:
function send(message) {
console.log(chatbotdns);
$.ajax({
url: chatbotdns + "/webhooks/rest/webhook",
type: "POST",
contentType: "application/json",
data: JSON.stringify({ message: message, sender: user_id }),
success: function(botResponse, status) {
console.log("Response from Rasa: ", botResponse, "\nStatus: ", status);
}
setBotResponse(botResponse);
},
error: function(xhr, textStatus, errorThrown) {
setBotResponse("");
console.log("Error from bot end: ", textStatus);
}
});
}
Now I want to set a tag to this conversation. I tried with:
$.ajax({
url: chatbotdns + `/api/conversations/${user_id}/tags`,
type: "POST",
contentType: "application/json",
data: JSON.stringify({ "value": "tag-label", "color": "eb4034" }),
success: function(botResponse, status) {
console.log("set tag successful", botResponse, "\nStatus: ", status);
},
error: function(xhr, textStatus, errorThrown) {
setBotResponse("");
console.log("Error from bot end: ", textStatus);
}
});
But I get POST 400 (Bad Request) The url that is called is correct.
Any ideas how to fix this?