Help

Web api gives no result

por lingvistica postado 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: 1440, today: 0, week: 3, month: 19

Id: 10693004
Tags: api
Postado: Jan 6 2020, 5:55
Actualizado: Jan 6 2020, 7:53
Respostas: 1
Pontos de vista: 1505, hoje em dia: 1, semana: 3, mês: 18
0 0 0.0/5