How to use the Bot Libre nodejs SDK |
The Bot Libre Nodjs SDK allows you to easily integrate Bot Libre with a nodjs application. Through the SDK you can connect to your bots on Bot Libre, send messages, and train and configure your bots. You can also access Bot Libre analytics and AI services, and other content. Start by setting the 'Application ID', 'username' and 'password' are required. If you don't have an account yet, you can create one at botlibre. You can get an application ID from any of the services websites (Bot Libre, Bot Libre for Business). Getting StartedPrerequisits
InstallationClone the Bot Libre python SDK by clicking on this link:https://github.com/BotLibre/BotLibre/tree/master/sdk/nodejs Navigate to the project directorycd nodejs
Install dependencies
NoteIncluding separate scripts for development and production, with the development script utilizing nodemon for automatic server restarts. ScriptsStart application for developmentnpm run dev
The "dev" script uses nodemon to watch for changes in your TypeScript files and automatically restarts the server when changes occur. It executes the TypeScript files directly using ts-node. Start application for production
The "start" script runs the compiled JavaScript files in the dist directory using Node.js. After executing the command
[nodemon] to restart at any time, enter `rs`
Open your browser and navigate to
Important: Before trying other api calls, most of them require additional attributes, which needs to be entered manually. Please review the file |
|
|
|