Text API object

Hierarchy

Constructors

Properties

Methods

Constructors

  • Create a Text object for the API

    Parameters

    • body: string

      The content of the text message which can contain formatting and URLs which begin with http:// or https://

    • Optional preview_url: boolean

      By default, WhatsApp recognizes URLs and makes them clickable, but you can also include a preview box with more information about the link. Set this field to true if you want to include a URL preview box.

    Returns Text

    Throws

    If body is over 4096 characters

Properties

body: string

Body of the message. Maximum length: 4096 characters.

preview_url?: boolean

Whether to enable preview for the text message

Methods

Generated using TypeDoc