BotMan + Cisco Spark Demo
June 26, 2017 ยท View on GitHub
This project shows how to use BotMan in combination with Cisco Spark.
Installation
- Clone this repository.
composer install- Copy the
.env.examplefile to.env. - Create a Cisco Spark Bot and past the access token into your
.envfile. - Use Laravel Valet or ngrok to create a local tunnel to the folder containing the
index.phpfile. - Create a Cisco Spark Webhook with the created URL:
Just replace --YOUR-AUTHORIZATION-TOKEN-- with your token and --YOUR-URL-- with your bot URL.
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.