> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# Connect a WhatsApp business number

> Connect a Meta-verified WhatsApp business number to your SignalWire Space so it can take calls from WhatsApp.

WhatsApp calling starts with a business number connected to your Space. SignalWire connects to
WhatsApp through your existing Facebook/Meta Business account. Once the connection is made, your
WhatsApp business numbers appear in your Space, ready for you to
[enable voice](/docs/platform/voice/whatsapp/enable-voice) and
[attach a Resource to answer](/docs/platform/voice/whatsapp/receive-calls).

One connection serves both channels. If you already connected the number for
[WhatsApp messaging](/docs/platform/messaging/whatsapp), skip ahead to
[enabling voice](/docs/platform/voice/whatsapp/enable-voice).

## Prerequisites

You need a **Meta Business Account** (Facebook/Meta Business).

## Connect your account

### Add a WhatsApp connection

In your [SignalWire Dashboard](https://my.signalwire.com), open **Integrations** and select the
**WhatsApp** tile to start Meta's embedded signup.

### Complete Meta embedded signup

SignalWire uses Meta's **embedded signup** flow to link your WhatsApp Business Account (WABA) to
your SignalWire Space. During this flow you authorize the connection with Meta and select the
business phone numbers to register.

### Confirm your numbers

Your WhatsApp Business Account appears under **Connected Integrations** on the Integrations page.
Open it and check the **WhatsApp Numbers** tab. A number must show **Registered** before you can use
it. **Pending** means it hasn't finished registering with Meta: complete its setup in the Meta
Business dashboard, then select **Sync with Meta** to refresh the status.

To add or remove numbers, make the change in the Meta Business dashboard, then open the connection in
your SignalWire Dashboard and select **Sync with Meta** to pull the current numbers and templates into
your Space. A number you remove in Meta is removed from your Space on the next sync, along with any
routing configured for it. Adding and removing WhatsApp numbers is not available through the
SignalWire API.

## Verify the connection

These calls need your SignalWire **project credentials**: your Project ID and an API token with the
**Numbers** scope, both found in your [SignalWire Dashboard](https://my.signalwire.com).

List the WhatsApp numbers in your Space:

### Request

GET https\://%7BYour\_Space\_Name%7D.signalwire.com/api/messaging/whatsapp/numbers

```curl
curl https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers \
     -u "<project_id>:<api_token>"
```

```python
import requests

url = "https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers"

response = requests.get(url, auth=("<project_id>", "<api_token>"))

print(response.json())
```

```javascript
const url = 'https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers';
const credentials = btoa("<project_id>:<api_token>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<project_id>", "<api_token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<project_id>", "<api_token>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers")
  .basicAuth("<project_id>", "<api_token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers', [
  'headers' => [
  ],
    'auth' => ['<project_id>', '<api_token>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers");
client.Authenticator = new HttpBasicAuthenticator("<project_id>", "<api_token>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<project_id>:<api_token>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://{your_space_name}.signalwire.com/api/messaging/whatsapp/numbers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Response (200)

```json
{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "business_phone_number_id": "102290129340398",
      "phone_number": "whatsapp:+15557654321",
      "calling_handler_resource_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "messaging_handler_resource_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "business_name": "Acme, Inc.",
      "waba_id": "109876543210987",
      "whatsapp_business_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "voice_enabled": false,
      "voice_capable": false,
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ]
}
```

A freshly connected number reports `voice_enabled` and `voice_capable` as false. The next two guides
turn them on in order: [enabling voice](/docs/platform/voice/whatsapp/enable-voice) sets
`voice_enabled`, and [attaching a Resource](/docs/platform/voice/whatsapp/receive-calls) sets
`voice_capable`. See the [List WhatsApp numbers](/docs/apis/rest/whatsapp/list-whatsapp-numbers)
reference for the full response schema.

## Next steps

#### [Enable voice on the number](/docs/platform/voice/whatsapp/enable-voice)

Turn on calling for the connected number and confirm it took effect.

#### [Receive WhatsApp calls](/docs/platform/voice/whatsapp/receive-calls)

Attach a Resource to answer inbound calls, and find them in your logs.