2
我正在使用Cleverbot.io框架調用Cleverbot API。這裏是我的代碼:Cleverbot.io API不起作用
var cleverbot = require('cleverbot.io');
bot = new cleverbot(xxAPI_USERxx,xxAPI_TOKENxx);
const SESSION_NAME = xxSESSION_NAMExx;
bot.setNick(SESSION_NAME);
bot.create(function (err, SESSION_NAME) {
bot.ask('Hi!', function (err, res) {
console.log(res);
});
});
當我運行這段代碼時,它返回「Error:Bad Call to the API」。我也嘗試通過網站的API瀏覽器調用API:https://docs.cleverbot.io/docs/getting-started。我得到了同樣的錯誤。
我該如何解決這個問題?
我已經嘗試了幾個小時的過程,並且它仍然被關閉。我會推特他們。 – Romulus3799
cleverbot.io的基礎URL是https://cleverbot.io/1.0/,它提供了404錯誤。如果版本已更新,則獲取新的基礎URL並進行更新。 – Ali
這不是問題。我也嘗試通過網站的API瀏覽器調用API;同樣的錯誤。這是它的位置:https://docs.cleverbot.io/docs/getting-started – Romulus3799