A bot that uses RESTful API calls to monitor a conversation for circuit.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode first commit Sep 7, 2018
README.md
app.js Change to app.js Sep 11, 2018
config.json.template Change to README, app.js, config.json.template, package.json. Delete … Sep 8, 2018
package.json Change to package.json Sep 10, 2018

README.md

Circuit RESTful bot GET | POST | Webhook

Description

This is an example bot that uses RESTful API calls to monitor a conversation on circuit. The bot will log the most recent items in the conversation, post a new item once it is listening, and then log any new items posted in the conversation.

Prerequisites

NodeJS

Dependencies

REST Reference

Other examples of RESTful API's with circuit can be found here.

Usage

  1. Clone the respository.
  2. Run : $ npm install.
  3. Rename config.json.template to config.json after adding your client_id, client_secret, url, and the port the bot will run on. The url field should refer to the return url the webhook should send data to. Once you have done so all you need to do is run $ npm start and the bot will begin.
  • Note: The bot must be a part of the conversation it is listening to.
  1. If you want to host this on your local machine you can use something like ngrok to host the bot. For the webhooks just add the ngrok url as the url field in the config.json file, make sure you serve the ngrok tunnel on the same port as the bot.