# Using Verify Silent Network Auth with Twilio Regions

## Test SNA Today

[Get Started](/docs/verify/verify-sna-live-test-number)

Skip the 2-4 week wait for carrier approvals and get directly to testing SNA with your own mobile number using the new [Live Test Number](/docs/verify/verify-sna-live-test-number) feature.

## Overview

To control data residency and optimize application performance, Verify developers can select the [Twilio Region](/docs/global-infrastructure/understanding-twilio-regions) that their Silent Network Auth (SNA) request is processed out of.

Verify SNA currently operates in the following Regions:

* United States (US1) - Default Region
* Ireland (IE1)

To use this feature, you will need to create Region-specific authentication credentials and specify that target Region in your request. See [Using the Twilio REST API in a non-US Region](/docs/global-infrastructure/using-the-twilio-rest-api-in-a-non-us-region) for more information on formulating these REST API or Twilio SDK requests. If no target Region is specified, the request will be handled in US1 by default. Keep in mind that Regions operate in full isolation from each other. Although Verify SNA does not store data beyond internal logging, its workload processing will happen in-Region. [Read more on Twilio's Region Isolation Model here](/docs/global-infrastructure/understanding-twilio-regions#twilios-region-isolation-model).

> \[!WARNING]
>
> Note that during this initial phase of the rollout of Twilio Regions, Twilio does not guarantee that all data will remain within your selected Region. For example, [globally accessible Twilio resources](/docs/global-infrastructure/understanding-twilio-regions#globally-accessible-twilio-resources) like account-level billing and usage records are shared across all Regions.

## Limitations

* Only the SNA channel of Verify is available in IE1 at this time. API requests to the [Start New Verification](/docs/verify/api/verification#start-new-verification) endpoint using a channel other than `sna` will fail. We plan to support SMS and additional channels in the future.
* The Verify v1 API is not currently available in IE1.

## Quickstart

### Step 1: Authentication

Before making an API request, you'll need to generate an API key specifically for the IE1 Region. You can then use this Region-specific API Key to authenticate Twilio API requests in the IE1 Region.

To create the key, follow these steps:

1. Log in to the [Twilio Console](https://console.twilio.com/).
2. Click the **Account** menu in the upper right corner of the screen.
3. Click **API keys & tokens**, under the **Keys & Credentials** heading.
4. Select **Ireland (IE1)** from the Region dropdown list.
5. Click the blue **Create API key** button.
6. Enter a friendly name for the key (example: "Verify SNA with Twilio Regions").
7. Leave **Key type** on the default option, "Standard".
8. Click the blue **Create API Key** button.

Make a note of the API Key's **SID** and **Secret**. You will need this information to authenticate all IE1 API calls.

### Step 2: Set up IE1 base API URL

For this Quickstart, we will be demonstrating the process using REST API calls. [Read here](/docs/global-infrastructure/using-the-twilio-rest-api-in-a-non-us-region) for more information on selecting a Region for Twilio client libraries/SDKs.

To select the target Region of IE1 for a Verification, use this base URL for your API requests. The parameter **dublin** is the Edge Location of your request, which can be replaced with whichever Edge is closest to your application. See [Edge Locations](/docs/global-infrastructure/edge-locations) for a list of what Edges are available to you.

```bash
https://verify.dublin.ie1.twilio.com/
```

### Step 3: Create a Verify Service in IE1

Use the [Create a Verification Service endpoint](/docs/verify/api/service#create-a-verification-service) with the IE1 base API URL to create a Verify Service in IE1. Existing Verify Services created in US1 will not work for the next steps.

The variables `$TWILIO_API_KEY` and `$TWILIO_API_KEY_SECRET` should resolve to the IE1 Region API Key SID and Secret that you created in Step 1.

```bash
curl -X POST "https://verify.dublin.ie1.twilio.com/v2/Services" \
--data-urlencode "FriendlyName=My IE1 Verify Service" \
-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
```

Make a note of the new Service's `sid` included in the response, it will be in the format `VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`. You will use this information in the next step.

### Step 4: Start a new SNA Verification in IE1

Use the [Start New Verification](/docs/verify/api/verification#start-new-verification) endpoint with the IE1 API base URL to create a new Verification using the `sna` channel.

When making this request, replace `VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`with the SID of your IE1 Verify Service and `+447440963594`with the phone number you'd like to verify.

```bash
curl -X POST 'https://verify.dublin.ie1.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications' \
--data-urlencode 'To=+447440963594' \
--data-urlencode 'Channel=sna' \
-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
```

Using one of the SDKs, an equivalent Node.js request would look like:

```javascript
const accountSid = process.env.ACCOUNT_SID;
const apiKey = process.env.API_KEY_SID;
const apiKeySecret = process.env.API_KEY_SECRET;

const client = require('twilio')(
     apiKey,
     apiKeySecret, 
     {
          accountSid: accountSid,
          edge: 'dublin',
          region: 'ie1'
     }
);

client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
     .verifications
     .create({to: '+447440963594', channel: 'sna'})
     .then(verification => console.log(verificaiton.sid));

```

### Step 5: Invoke the SNA URL

Continue the SNA flow by invoking the `sna.url` property received in the response of the previous Start New Verification call from the client device. This part of the process is the same regardless of Region used, check out our existing [API Reference](/docs/verify/api/verification#send-post-request-to-response-property-snaurl) or [Testing Guide](/docs/verify/sna-testing-guide#step-2-invoke-the-sna-url) documentation for more details.

### Step 6: Check the Verification Attempt result in IE1

Send a request to the [Verification Check](/docs/verify/api/verification-check) endpoint with the IE1 API base URL to confirm that the SNA URL invocation and Verification Attempt were successful.

When making this request, replace `VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX`with the SID of your IE1 Verify Service and `+447440963594`with the phone number you verified.

```bash
curl -X POST 'https://verify.dublin.ie1.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VerificationCheck' \
--data-urlencode 'To=+447440963594' \
-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
```
