Text messages are messages containing only a text body and an optional link preview.
TEXT Object
Parameter
Type
Description
Value / Pattern
*body
String
Contains the text of the message, which can contain URLs and formatting. Maximum length: 4096 characters
Hi, How can I help you?
preview url
Boolean
Set to true to have the WhatsApp Messenger and WhatsApp Business apps attempt to render a link preview of any URL in the body text string. URLs must begin with http:// or https://. If multiple URLs are in the body text string, only the first URL will be rendered. If preview_url is omitted, or if unable to retrieve a preview, a clickable link will be rendered instead.
"text":{"preview_url":true,"body":"Hi, How can I help you?"}
constClient=require('direct7')constclient=newClient(apiToken="Your API token")constresponse=awaitclient.whatsapp.sendWhatsAppFreeformMessage({originator:"{registered_phonenumber}",recipients:[{"recipient":"{recipient}","recipient_type":"individual"}],message_type:"TEXT",body:"Hi, How can I help you?"});console.log(response);
fromdirect7importClientclient=Client(api_token="Your API token")client.whatsapp.send_whatsapp_freeform_message(originator="{registered_phonenumber}",recipients:[{"recipient":"{recipient}","recipient_type":"individual"}],message_type="TEXT",body="Hi, How can I help you?")
require_once__DIR__.'/vendor/autoload.php';usedirect7\Direct7\Client;$client=newClient(api_token="Your API token")$response=$direct7->whatsapp->sendWhatsAppFreeformMessage(originator:"{registered_phonenumber}",recipients:[["recipient"=>"{recipient}","recipient_type"=>"individual"]],message_type:"TEXT",body:"Hi");var_dump($response);
import("github.com/d7networks/direct7-go-sdk/direct7")apiToken:="Your Api Token"client:=direct7.NewClient(apiToken)originator:="{registered_phonenumber}"recipients:=[]map[string]string{"recipient":"{recipient}","recipient_type":"individual",}messageType:="TEXT"optParams:=&OptionalParams{body:"Hi",}response,err:=whatsapp.SendWhatsAppFreeformMessage(originator,recipients,messageType,optParams)
varheaders={'Content-Type':'application/json','Authorization':'Bearer {{api_access_token}}'};varrequest=http.Request('POST',Uri.parse('https://api.d7networks.com/whatsapp/v2/send'));request.body=json.encode({"messages":[{"originator":"{registered phone_number}","content":{"message_type":"TEXT","text":{"preview_url":true,"body":"Hi, How can I help you?"}},"recipients":[{"recipient":"{recipient}","recipient_type":"individual"}],"report_url":"https://webhook.site/4235f691-13ab-448e-b100-74a3a627927f"}]});request.headers.addAll(headers);http.StreamedResponseresponse=awaitrequest.send();if(response.statusCode==200){print(awaitresponse.stream.bytesToString());}else{print(response.reasonPhrase);}
require'direct7'client=Direct7::Client.new('Your API token')client.whatsapp.send_whatsapp_freeform_message(originator='{originator}',recipients=[{"recipient"=>"{recipient}","recipient_type"=>"individual"}],message_type='TEXT',body='Hi, How can I help you?',)