You will need a Smooch app with a channel configured before connecting Smooch to Botpress
- On the Smooch home page, click on Create new app.
- Enter a name for your app and click Create App
- Connect a channel to your app (Telegram, Whatsapp, or any other listed channel)
- You should see a channel in the Overview section of your app
The smooch channel needs the app id to identify the smooch app when making API calls
- Go to the Settings section of your app
- You should see an App Id section if you scroll down. Copy paste this value to the appId channel configuration
The key id and secret are needed to authenticate API calls to Smooch
- At the bottom of to the Settings section of your app, click Generate API key
- Copy paste the id (the one that starts with
app_
) in the keyId channel configuration - Copy paste the secret in the keySecret configuration
The webhook secret is needed to validate webhooks requests. You get a webhook secret for each webhook integration you create
- Go to the Integration section of your app
- In the API & Webhooks section, click on Webhooks
- Click Connect, then Create a webhook
- Set the webhook URL to:
<EXTERNAL_URL>/api/v1/messaging/webhooks/v1/<YOUR_BOT_ID/smooch
- Select
v2
as your webhook version - Select Conversation message and Postbacks in the basic triggers
- Click Create Webhook. You will see the webhook you created in the table, and the secret in the last column
- Copy paste the webhook secret in the webhookSecret channel configuration
- Edit your bot config
{
// ... other data
"messaging": {
"channels": {
"smooch": {
"version": "1.0.0",
"enabled": true,
"appId": "your_app_id",
"webhookSecret": "your_webhook_secret",
"keyId": "your_key_id",
"keySecret": "your_key_secret"
}
// ... other channels can also be configured here
}
}
}
- Restart Botpress.