whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

Sessionbased webhook-url

Open neucrk opened this issue 1 year ago • 4 comments

Is it possible (and if so, how) to define session-based webhook-url via an api-call?

Thank you for this project! ;)

neucrk avatar Nov 12 '24 11:11 neucrk

There is only one option to set the env variable for each configured session

avoylenko avatar Nov 13 '24 08:11 avoylenko

@avoylenko could you please clarify, each session can have one webhook configuration in the env file? What would be the best way handle dynamic webhook rules for any number of sessions?

lazmo88 avatar Dec 05 '24 17:12 lazmo88

Right, each wwebjs session uses just one webhook configuration. You might need an extra reserve proxy to handle your scenario.

avoylenko avatar Dec 05 '24 18:12 avoylenko

I use two webhooks, you must only configure on your .env ie.:

If you have the sessionId defined as DEMO, the environment variable must be DEMO_WEBHOOK_URL but define too a default webhook (it could be the default webhook)

devitbash avatar Apr 21 '25 03:04 devitbash