mimamch / wa-gateway

Headless Multi Session Whatsapp Gateway API
MIT License
159 stars 95 forks source link

feature webhook on session #12

Closed huiralb closed 11 months ago

huiralb commented 11 months ago

Hello @mimamch . I just added feature webhook. At this moment i added for session section.

Reason

We want to any callback or message from server-gateway to tell client-server which the session was connected.

Usage

  1. Add variable to .env file with WEBHOOK_ENABLED=true
  2. Now the url to connect new session is: GET /start-session?session=NEW_SESSION_NAME&scan=true&webhookUrl=http://client-server.test/callback We assume you have client-server url http://client-server.test/callback
  3. At client url you should grab $_POST['session'] and $_POST['event']

Extra:

mimamch commented 11 months ago

I think this feature not urgently needed by most users 🤔

huiralb commented 11 months ago

I think this feature not urgently needed by most users thinking

Ok. Fine. But i need it.