Help

Web api gives no result

by lingvistica posted Jan 6 2020, 5:55

1 URL WIKIPEDIA https://www.botlibre.com/rest/api/form-chat?instance=10683342&message=hoe+gaat+het&application=xxx

Issueing this request has no result while via the api console the request shows the correct response

var request = new XMLHttpRequest();
request.open('POST', 'https://www.botlibre.biz/rest/api/chat', true);
request.setRequestHeader('Content-Type', 'application/xml');
var xml = "<chat application='xxx' instance='10683342'><message>hoe gaat het</message></chat>";
request.onreadystatechange = function() {
exampleResult.setValue(request.responseText, -1);
};
request.send(xml);
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><response conversation="1773657403966351985" emote="NONE" avatar="images/bot.png" avatarType="image/jpeg">
<message>het gaat goed in ben in opleiding</message></response>

Please advice


by admin posted Jan 6 2020, 7:54

The issue is you are using botlibre.com in the URL, but should be using botlibre.biz

https://www.botlibre.biz/rest/api/form-chat?instance=10683342&message=hoe+gaat+het&application=xxx


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1918, today: 1, week: 12, month: 2

Id: 10693004
Tags: api
Posted: Jan 6 2020, 5:55
Updated: Jan 6 2020, 7:53
Replies: 1
Views: 2008, today: 1, week: 14, month: 2
0 0 0.0/5