This application can accept LINE Bot webhook HTTP requests, check signature and reroute request to other bot servers.
Each downstream bot will receive each message, but only one can use reply API. Though any bot can use push APIs.
-
Specify
channel-secret
andchannel-access-token
settings inapplication.yml
. These values can be found in the LINE Developers Console. -
Make sure all downstream bot use the same
channel-secret
andchannel-access-token
. -
Add all downstream bot webhooks URIs to the
downstreams
list in inapplication.yml
. -
In LINE Developers Console set
Webhook URL
to thehttps://your-host.com/webhook/bot
. -
Build
./gradlew build
. -
Run
java $JAVA_OPTS -jar router-server/build/libs/router-server.jar --armeria.ports\[0\].port=8080 --armeria.ports\[0\].protocol=HTTP
.
Rate limits for replies, push messages and other APIs are shared between all bots.