Quickstart
- Create a venv and install deps:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt- Run a reverse proxy (e.g, ngrok or Tailscale Funnel)
- Configure an API client in the Portal, and configure it with the reverse proxy address
- Add the API client to a team
- Add the team to a fleet / region, with the appropriate notifications enabled
- Configure the script with the downloaded HMAC secret from step 3, and an optional bearer token (provided by the end user)
- Run the server:
python app.pyServer listens on http://localhost:8000
Endpoints
- POST /webhook -> accepts an asynchronous webhook call from the Thoro Portal
Example expected payload shape
{
"event": "ai.thoro.device.power_on",
"message": "Power on event",
"body": {
"robot_id": "0016338",
"fleet_id": "1",
"timestamp": 1765890030
}
}Example curl
curl -X POST http://localhost:8000/webhook \
-H 'Content-Type: application/json' \
-d '{
"event":"ai.thoro.device.power_on",
"message":"Power on event",
"body":{"robot_id":"0016338","fleet_id":"1","timestamp":1765890030}
}'