You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the past version of bottender we can use "cross-platform-example" skill to run multiple LineBot at different express endpoint.
But now all bot config come from "root/bottender.config.js", and there just can have one "line" channel key. So we can not run multiple LineBot at one express server.
Why need this feature? If we want build a platform let customer provide their own LINE@ to bind:
And the bot will work according to database data query by customer_id.
Now I just can use docker or create 1000+ of cloud function to reach goals.
Any structure suggestions or right way to do?
Hi @pepper, this definitely an important use case that we want to support in Bottender. We were all set to support this use case by using destination field from LINE requests, but after a while we found that was totally useless because we can't convert the bot id to the channel id.
As far as I can tell, There is no recommended way to do this, however, we will try our best to find a solution in a few days.
Hi @pepper,
We have implemented a solution in v1.5.0-alpha.3 using a getConfig function:
module.exports={channels: {line: {enabled: true,path: '/webhooks/line/:channelId',asyncgetConfig({ params }){console.log(params.channelId);// ...get the config from the API, database or wherever you like when every time receiving a new event return{
accessToken,
channelSecret,};},},},};
In the past version of bottender we can use "cross-platform-example" skill to run multiple LineBot at different express endpoint.
But now all bot config come from "root/bottender.config.js", and there just can have one "line" channel key. So we can not run multiple LineBot at one express server.
Why need this feature? If we want build a platform let customer provide their own LINE@ to bind:
https://sample.bot/say_hello/${customer_id}/line
And the bot will work according to database data query by customer_id.
Now I just can use docker or create 1000+ of cloud function to reach goals.
Any structure suggestions or right way to do?
Thanks!
Relate: #141 #415 (Messenger)
The text was updated successfully, but these errors were encountered: