# Connect WhatsApp through Evolution (QR code)

> How to create a WhatsApp (Evolution) inbox by picking a server or entering URL and API key, connect the number by QR code and receive groups.

The **WhatsApp (Evolution)** inbox connects a WhatsApp number through an Evolution server. You connect the number by scanning a QR code on the phone, just like WhatsApp Web. TalkVend sets up the webhook on the instance by itself: there is no URL to paste.

## What you need

You need an Evolution server reachable over the internet. It can be:

- a server of your own account, ordered on the **Servers** page (if you have the **Manage servers** permission);
- any other Evolution server, entered by hand with its URL and global API key.

## Create the inbox

1. In the sidebar, open **Inboxes** and click **New inbox**.
2. Choose **WhatsApp (Evolution)**.
3. Fill in the inbox **Name**.
4. Provide the server, in one of the two ways described below.
5. Fill in the **Instance name**. If the instance doesn't exist on the server, it is created automatically.
6. Optionally, check **Require a template on the first message**. With it, agents must pick a template to start a conversation instead of free text.
7. Click **Create inbox**.

You don't need to enter the phone number: it is detected automatically once the phone is connected.

### Pick a server from the account

If you have the **Manage servers** permission and the account has a ready Evolution server, the form shows the **Server** field. Pick the server from the list: the URL and API key come from it, with nothing to copy.

If the chosen server doesn't expose the URL and API key, the form asks you to enter them manually.

### Enter the server manually

With no servers in the account (or by choosing **Add server manually** in the list), fill in:

- **Evolution server URL**: for example, `https://evolution.yourcompany.com`;
- **API key**: the Evolution server's GLOBAL apikey, needed to create the instance automatically. It isn't shown again once saved.

## Connect the number by QR code

After the inbox is created, the **Inbox created — connect the number** screen shows a QR code.

1. Open WhatsApp on your phone.
2. Go to **Linked devices** and tap Link a device.
3. Scan the QR code on the screen.
4. Wait for **Instance connected**. The number is ready to send and receive messages.
5. Click **Done**.

If the QR expires or doesn't show up, click **Refresh QR**. If the instance was already connected, the screen shows **Instance already connected** and you only need to finish.

## Monitor the connection

On the inbox page, the **Connection** block shows the number's state: **Connected**, **Connecting…** or **Disconnected**.

- **Sync** checks the state again.
- **Reconnect (QR)** opens a new QR code, for when the phone was disconnected.
- Under **Secrets**, **Rotate** on the **API key** replaces the key. The new key is validated against the server before saving, and the webhook is reconfigured automatically.

## WhatsApp groups

By default, group messages don't enter the inbox. To handle groups the number already belongs to:

1. On the inbox page, in the **WhatsApp groups** block, click **Configure**.
2. Turn on **Receive groups**.
3. Select, in the list, the groups that should come in. Use **Search group** if the list is long.
4. Click **Save**.

Each selected group becomes a conversation in this inbox. Only new messages arrive: earlier group history isn't imported. Groups outside the list keep being ignored.

> **Warning:** flows, AI and campaigns don't act on groups. Group conversations are always handled by people.

## Campaign sending pace

To protect the number, campaigns from this inbox use a slower default pace: a random interval of 15 to 40 seconds between each send, and a longer pause of 1 to 2 minutes every 20 sends. Learn more in [Campaigns](https://talkvend.com/en/help/campanhas).
