mywhin

שולם
על ידי inUtil Labs | מְעוּדכָּן 6日前 | Social
פּוֹפּוּלָרִיוּת

9.5 / 10

חֶבִיוֹן

1,579ms

רמת שירות

98%

Health Check

100%

חזרה לכל הדיונים

Possible to send strings with linebreaks ?

Rapid account: Commandepainpan
commandepainpan
4ヶ月前

Hello there! This is my first post on your forum and I’m a beginner, so please bear with me.

I’m trying to pass information from Google Sheets via Document Studio Webhook via mywhin to display as a Whatsapp groups message. It all works nicely, but when the message is passed on to Whatsapp, all the linebreaks have disappeared or have been rewritten to \n. Is this not possible or do I need to escape a linebreak in any way?

Thank you and have a good day!

p.

Rapid account: Luu 4 T
luu4t Commented 4ヶ月前

Hello, the linebreaks will go through correctly, just make sure you adjust the content type header so that the backend can process the message content correctly.

This is a working example when using curl command:

curl --request POST
–url https://mywhin.p.rapidapi.com/wspout
–header ‘X-RapidAPI-Host: mywhin.p.rapidapi.com
–header ‘X-RapidAPI-Key: YOUR_API_KEY_GOES_HERE’
–header ‘content-type: application/json’
–data ‘{
“number”: “DESTINATION_NUMBER”,
“msg”: {
“text”: “Hello\nworld!”
}
}’

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות