Constructor
new Text(body, preview_url)
- Source:
Properties:
Name |
Type |
Description |
body |
String
|
Body of the message. Maximum length: 4096 characters. |
preview_url |
Boolean
|
Whether to enable preview for the text message |
_ |
String
|
The type of the object, for internal use only |
Create a Text object for the API
Parameters:
Name |
Type |
Description |
body |
String
|
The text of the text message which can contain formatting and URLs which begin with http:// or https:// |
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. |
Throws:
-
-
If body is not provided
-
-
Type
-
Error
-
-
If body is over 4096 characters
-
-
Type
-
Error