devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
820 stars 249 forks source link

[Feature Request][NOWEB] - Add sendContactVcard #256

Closed mycodemm closed 3 months ago

mycodemm commented 5 months ago

GET /api/sendContactVcard Can we send this through NOWEB? As Whatsapp Web Support To Send Contact. WhatsApp Image 2024-01-14 at 8 29 08 PM

patron:ADVANCED

allburov commented 5 months ago

Yep, it's possible, just didn't get such request. Will add it (no ETA yet)

devlikepro commented 3 months ago

Hi! Support for POST /api/sendContactVcard in NOWEB engine has been added in WAHA Plus 2024.3.10! Please make sure to update your version to use that feature

If anyone is interested in sending contact vcard in WEBJS engine (default one) - please create a new issue so we can work on that too :pray:


Send contact (vcard)

Use POST /api/sendContactVcard to send contact (vcard).

You can use fields this way:

{
  "session": "default",
  "chatId": "79111111@c.us",
  "contacts": [
    {
      "fullName": "John Doe",
      "organization": "Company Name",
      "phoneNumber": "+91 11111 11111",
      "whatsappId": "911111111111"
    }
  ]
}

Or provide a vCard file content:

{
  "session": "default",
  "chatId": "79111111@c.us",
  "contacts": [
    {
      "vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD"
    }
  ]
}

Or even combine it:

  {
  "chatId": "79111111@c.us",
  "contacts": [
    {
      "vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nORG:Company Name;\nTEL;type=CELL;type=VOICE;waid=911111111111:+91 11111 11111\nEND:VCARD"
    },
    {
      "fullName": "John Doe",
      "organization": "Company Name",
      "phoneNumber": "+91 11111 11111",
      "whatsappId": "911111111111"
    }
  ],
  "session": "default"
}

patron:PRO