Contacts API object

Hierarchy (view full)

Constructors

Properties

Constructors

  • Create a Contacts object for the API

    Parameters

    Returns Contacts

    import { Contacts, Name, Address, Phone } from "whatsapp-api-js/messages";

    const contact_message = new Contacts([
    new Name("John Doe", "John", "Doe", undefined, "Mr.", "Jr."),
    new Address(
    "United States",
    "US",
    "FL",
    "Miami",
    "221B Baker Street",
    "33101",
    "Mystery"
    ),
    new Phone("+123456789", "Mystery", "123456789")
    ]);

    If contact contains multiple of the same components and _many is set to false (for example, Name, Birthday and Organization)

Properties

component: BuiltContact[]

The contacts of the message