> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codenullapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp

> From hooks, you can integrate easily with Whatsapp to send and receive messages.

From hooks, you can integrate easily with Whatsapp to send and receive messages.

### Configure integration

First, you need to configure the settings in the application designer

<Info>
  You will need to have configured your Facebook and WhatsApp applications properly. More info here: [https://developers.facebook.com/docs/whatsapp/business-management-api/get-started](https://developers.facebook.com/docs/whatsapp/business-management-api/get-started)
</Info>

<figure><img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/GoYJF3x2TLWurcySEQKJ.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=48fef26165efcfd43f9fdae362d10d5c" alt="" width="3410" height="816" data-path="images/GoYJF3x2TLWurcySEQKJ.png" /><figcaption><p>WhatsApp settings in Application Designer</p></figcaption></figure>

### Send Messages

To send a notification you can send it like this

```javascript theme={null}
const sendWhatsAppMessage = require("./utils/sendWhatsAppMessage").default;

//send simple text
await sendWhatsAppMessage({
  to: '573173896699',
  type: 'text',
  content: { body: 'hola mundo' },
});

//send messages using WhatsApp templates
await sendWhatsAppMessage({
  to: '573173896699',
  type: 'template',
  from: 'comercial',
  content: {
    name: 'sample_issue_resolution',
    language: {
      code: 'en_US',
    },
    components: [
      {
        type: 'body',
        parameters: [
          {
            type: 'text',
            text: 'Jhon Doe',
          },
        ],
      },
    ],
  },
});
```
