# Send message to WhatsApp

**URL:** <https://forums.losant.com/t/send-message-to-whatsapp/3901>\
**Category:** Help\
**Tags:** workflow\
**Created:** [July 7, 2021, 8:50pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901 "2021-07-07T20:50:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcelo\_Bohrer](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Marcelo\_Bohrer](https://forums.losant.com/u/Marcelo_Bohrer)\
**Post date:** [July 7, 2021, 8:50pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/1 "2021-07-07T20:50:05Z")

</div>

Hi,  
I would like to know if exist someway how to send message to whatsApp using workflows. Today I can to do this sending a SMS and does works fine;  
Tks.

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [July 7, 2021, 8:55pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/3 "2021-07-07T20:55:06Z")

</div>

The best option is likely the [WhatsApp Business API](https://developers.facebook.com/docs/whatsapp/overview). This is a REST API that can be accessed using the [HTTP Node](https://docs.losant.com/workflows/data/http/).

---

<div class="post-metadata">

**Author:** ![Marcelo\_Bohrer](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Marcelo\_Bohrer](https://forums.losant.com/u/Marcelo_Bohrer)\
**Post date:** [July 19, 2021, 1:52pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/5 "2021-07-19T13:52:32Z")

</div>

Hi,

Could you send me a exemple please?

tks

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [July 19, 2021, 3:06pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/7 "2021-07-19T15:06:15Z")

</div>

Hello @Marcelo_Bohrer,

I don’t have an example of using the HTTP Node specifically with the WhatsApp Business API. For an example of how to use the HTTP Node to make an HTTP request, you can check out our [Losant Walkthrough](https://docs.losant.com/getting-started/walkthrough/#configure-http-node) which has an example of how to do this.

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Marcelo\_Bohrer](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Marcelo\_Bohrer](https://forums.losant.com/u/Marcelo_Bohrer)\
**Post date:** [July 19, 2021, 10:31pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/9 "2021-07-19T22:31:33Z")

</div>

Hi,

I tried to use HTTP node but I don’t know how does work to set a request method “POST”.

Below I did a Python code that does work fine. I would like to do the same into Losant to send message to whatsApp’s api

Please, do you have any ideia about how can I do this?

```python
import http.client
import mimetypes
conn = http.client.HTTPSConnection("api.positus.global")
payload = "{\r\n \"to\": \"+555199999999\",\r\n \"type\": \"text\",\r\n \"text\": {\r\n \"body\": \"Teste envio mensagem 2 para whats via Python\"\r\n }\r\n}"
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <token>'
}
conn.request("POST", "/v2/sandbox/whatsapp/numbers/<number>/messages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

```

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [July 20, 2021, 1:01pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/11 "2021-07-20T13:01:16Z")

</div>

@Marcelo_Bohrer,

Just as a reminder, please be mindful of posting tokens and passwords in our forums as it is a public space. I have edited your post to remove your token.

You can make POST requests with the [HTTP Node](https://docs.losant.com/workflows/data/http/) by changing the `Request Method` to POST. There are also fields for you to add information in the Body of the request, as well as adding request headers to your HTTP Request.

There is an example of how to make a POST request with the HTTP node in the [InfluxDB How To Guide](https://docs.losant.com/guides/how-to-visualize-data-at-the-edge-with-influxdb-and-losant/), specifically [Part 4](https://docs.losant.com/guides/how-to-visualize-data-at-the-edge-with-influxdb-and-losant/#part-4-sending-data-to-influxdb-from-the-edge-agent). Although this guide does make HTTP requests _locally_ and between Docker Containers, the HTTP Node configuration is similar, except for the Request URL.

Let me know if this works for you!

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Marcelo\_Bohrer](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Marcelo\_Bohrer](https://forums.losant.com/u/Marcelo_Bohrer)\
**Post date:** [July 20, 2021, 2:42pm UTC](https://forums.losant.com/t/send-message-to-whatsapp/3901/13 "2021-07-20T14:42:01Z")

</div>

Hi Heath,

Thanks a lot, I can to do. Now it’s works fine.  
About the tokens and passwords don’t worry I changed before sent to forum, okay;;;  
tks by help
