devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click! Two engines: chromium-based WEBJS and pure-websocket NOWEB
https://waha.devlike.pro/
Apache License 2.0
892 stars 275 forks source link

[Feature Request] - add "metadata" key=value pairs when creating session #443

Closed devlikepro closed 1 week ago

devlikepro commented 1 month ago

For integration purpose with application it can be useful to give a way to add additional "application related" data in session. After that, we'll send

  1. metadata back to the system in webhook event, so the app can easily match records in their database
  2. Show it on Dashboard so you can quickly search the desired session by using application and user data

For instance

{
  "name": "default",
  "metadata": {
    "user.id": 123,
    "user.email": "email@gmail.com"
  }
}

would give session.status event

{
    "event": "session.status",
    "session": "default",
    "me": {
        "id": "7911111@c.us",
        "pushName": "~"
    },
     "metadata": {
      "user.id": 123,
      "user.email": "email@gmail.com"
    }
    "payload": {
        "status": "WORKING"
    },
    "engine": "WEBJS",
    "environment": {
        "version": "2023.10.12",
        "engine": "WEBJS",
        "tier": "PLUS"
    }
}

patron:PRO

devlikepro commented 1 month ago

Ideally we should add it before after this one, so app doesn't have to put metadata over and over https://github.com/devlikeapro/waha/issues/435

patron:PRO

devlikepro commented 3 weeks ago

Will be in 2024.9.1, metadata when you create or update a session, which will be availble in Dashboard, Webhooks and API responses.

patron:PRO

devlikepro commented 1 week ago

https://waha.devlike.pro/docs/how-to/sessions/#metadata

patron:PRO