This is a demo middleware designed to demonstrate the capabilities of the unblu middleware library.
It:
-
Automatically creates a bot registration
-
Automatically creates a webhook registration
-
Correctly handles all webhooks and pings (lib handles that)
-
Correctly handles all bot outbound requests and pings (lib handles that)
-
Accepts all visitor onboarding offers
-
Greets a visitor when the dialog is open
-
Echos all visitor messages
-
Logs all messages, not just in a bot dialog (the webhook handler is set up to do so)
Adopt application.yaml
or populate environment variables (e.g. in a .env file):
UNBLU_HOST=https://some-installation.unblu.com
UNBLU_USER=some-unblu-admin-user
UNBLU_PASSWORD=hello-im-some-unblu-admin-user-password
MIDDLEWARE_URL=https://where.my.middleware.is.running
WEBHOOK_SECRET=a-very-secret-key
BOT_SECRET=another-very-secret-key