https://github.com/webexsamples/javabot
An example for implementing a simple Webex Teams bot using the Java SDK
https://github.com/webexsamples/javabot
Last synced: 11 months ago
JSON representation
An example for implementing a simple Webex Teams bot using the Java SDK
- Host: GitHub
- URL: https://github.com/webexsamples/javabot
- Owner: WebexSamples
- License: other
- Created: 2019-09-09T11:57:42.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-05-07T18:56:38.000Z (almost 2 years ago)
- Last Synced: 2025-04-03T15:23:28.540Z (12 months ago)
- Language: Java
- Homepage:
- Size: 14.6 KB
- Stars: 5
- Watchers: 5
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# javabot
## Description
Used to listen to events in Webex Teams on a localhost port. The only command it can understand is **hello**,
replies "hello there".
## Requirements
* **Webex Teams access token**: this will be used to communicate with Webex Teams. Ideally you would use the access token of the same bot here.
* **open port on localhost**: this is where the app will listen for incoming messages
* **Java 1.8**
* **Maven 3.6.1**
## Installation
* clone the repo
* ```mvn install```
* ```mvn exec:java -Dexec.mainClass=Main```
## Usage
```
+---------------------------------------------+
| |
| _ _ _ |
| | | __ ___ ____ _| |__ ___ | |_ |
| _ | |/ _` \ \ / / _` | '_ \ / _ \| __| |
| | |_| | (_| |\ V / (_| | |_) | (_) | |_ |
| \___/ \__,_| \_/ \__,_|_.__/ \___/ \__| |
| |
| |
+---------------------------------------------+
Please enter an access token
AaBbCcDdEeFfGgHhIiJjAaBbCcDdEeFfGgHhIiJjAaBbCcDdEeFfGgHhIiJj_ABCD_1a2b3c4d-1234-abcd-9876-abcdefghijkl
INFO Verifying account
INFO Account verified as Droid
Please enter port you want to listen on:
5000
INFO Service listening on localhost:5000
```
**Tip**: you can use the [hookbuster](https://github.com/WebexSamples/hookbuster) to test how this app works. Start a websocket listener for `messages:created` and the **hookbuster** will forward incoming message events to localhost, where **javabot** can listen to them. No need for webhooks!
## Dependencies
```xml
org.glassfish
javax.json
1.0.4
com.ciscospark
ciscospark-client
1.0-SNAPSHOT
org.json
json
20180130
```