Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mpociot/botman-spark-demo
BotMan + Cisco Spark demo project
https://github.com/mpociot/botman-spark-demo
Last synced: 26 days ago
JSON representation
BotMan + Cisco Spark demo project
- Host: GitHub
- URL: https://github.com/mpociot/botman-spark-demo
- Owner: mpociot
- Created: 2017-06-26T15:47:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-27T08:13:45.000Z (about 7 years ago)
- Last Synced: 2024-08-03T16:08:28.274Z (3 months ago)
- Language: PHP
- Size: 12.7 KB
- Stars: 5
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-webex - botman-spark-demo - Use BotMan in combination with the REST API (by mpociot). (Code samples / Bot samples)
README
# BotMan + Cisco Spark Demo
This project shows how to use BotMan in combination with Cisco Spark.
## Installation
- Clone this repository.
- `composer install`
- Copy the `.env.example` file to `.env`.
- Create a Cisco Spark Bot and past the access token into your `.env` file.
- Use Laravel Valet or ngrok to create a local tunnel to the folder containing the `index.php` file.
- Create a Cisco Spark Webhook with the created URL:Just replace `--YOUR-AUTHORIZATION-TOKEN--` with your token and `--YOUR-URL--` with your bot URL.
```bash
curl -X POST -H "Accept: application/json" -H "Authorization: Bearer --YOUR-AUTHORIZATION-TOKEN--" -H "Content-Type: application/json" -d '{
"name": "BotMan Webhook",
"targetUrl": "--YOUR-URL--",
"resource": "all",
"event": "all"
}' "https://api.ciscospark.com/v1/webhooks"
```Now you can write your bot.
To start a conversation, write `pizza`.
See `index.php` and `PizzaConversation.php` for available commands and how conversations work.