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
878 stars 273 forks source link

Get phone number of current session #191

Closed 50l3r closed 11 months ago

50l3r commented 12 months ago

Its there a way to obtain the phone number for a specific session already working?

Maybe in àpi/sessions

[
  {
    "name": "default",
    "status": "WORKING",
    "config": {
      "proxy": null,
      "webhooks": [
        {
          "url": "https://example.org",
          "events": [
            "message"
          ],
          "hmac": null,
          "retries": null,
          "customHeaders": null
        }
      ]
    }
  }
]
allburov commented 11 months ago

Added new GET /api/sessions/{session}/me endpoint and add me field to session data for GET /api/sessions response.

{
  "id": "11111111111@c.us",
  "pushName": "string"
}

Available in Plus 2023.9.3 (x86, no arm version yet, let me know if one needs it). We'll release it in the next week for Core version too!

allburov commented 11 months ago

The endpoint and me field can return null if it's stopped or failed or not authenticated yet

50l3r commented 11 months ago

Great! Much thanks :D