Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

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.