Add new line in whatsapp api link
To add a new line in a WhatsApp API link, you can use the following methods:
Method 1: Using the \n
escape sequence
You can use the \n
escape sequence to add a new line in your WhatsApp API link. For example:
https://api.whatsapp.com/send?phone=+1234567890&text=Hello%0AWorld!
The %0A
is the URL-encoded version of the \n
character, which represents a new line.
Method 2: Using the
HTML entity
You can also use the
HTML entity to add a new line in your WhatsApp API link. For example:
https://api.whatsapp.com/send?phone=+1234567890&text=Hello World!
The
entity represents a new line.
Method 3: Using the
HTML entity
Another way to add a new line is by using the
HTML entity. For example:
https://api.whatsapp.com/send?phone=+1234567890&text=Hello World!
The
entity also represents a new line.
Note: Make sure to URL-encode any special characters in your text, including the new line characters, using a tool like URL Encode.
Remember to replace +1234567890
with the actual phone number you want to send the message to, and Hello World!
with the actual text you want to send.