I was testing your flutter package, and sending a simple message with the messagesText function always returned false.
I did the test with Postman, sending the json that is sent with the messagesText function, and I got an error (Status 400).
As you can see, the message says Unexpected key 'previewUrl'. I read the Whatsapp Api Documentation and it says that the correct key inside the text object is "preview_url".
I changed the 'previewUrl' key to 'preview_url' and did the test with Postman, and I got the whatsapp message to my phone number.
So I corrected the key previewUrl to preview_url in the messagesText function, in my proyect.
I was testing your flutter package, and sending a simple message with the
messagesText
function always returned false. I did the test with Postman, sending the json that is sent with themessagesText
function, and I got an error (Status 400).As you can see, the message says
Unexpected key 'previewUrl'
. I read the Whatsapp Api Documentation and it says that the correct key inside the text object is "preview_url".I changed the 'previewUrl' key to 'preview_url' and did the test with Postman, and I got the whatsapp message to my phone number.
So I corrected the key
previewUrl
topreview_url
in themessagesText
function, in my proyect.And when using the function, the WhatsApp message is already sent and returns true.
I hope that you correct the key
previewUrl
, so that others who use your whatsapp package for flutter do not have the same problem.