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 feature.
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 feature.
To control data residency and optimize application performance, Verify developers can select the Twilio Region that their Silent Network Auth (SNA) request is processed out of.
Verify SNA currently operates in the following Regions:
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 for more information on formulating these REST API or Twilio helper library/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.
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 like account-level billing and usage records are shared across all Regions.
Only the SNA channel of Verify is available in IE1 at this time. API requests to the 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.
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:
Make a note of the API Key's SID and Secret. You will need this information to authenticate all IE1 API calls.
For this Quickstart, we will be demonstrating the process using REST API calls. Read here 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 for a list of what Edges are available to you.
https://verify.dublin.ie1.twilio.com/
Use the Create a Verification Service endpoint 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.
1curl -X POST "https://verify.dublin.ie1.twilio.com/v2/Services" \2--data-urlencode "FriendlyName=My IE1 Verify Service" \3-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.
Use the 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.
1curl -X POST 'https://verify.dublin.ie1.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications' \2--data-urlencode 'To=+447440963594' \3--data-urlencode 'Channel=sna' \4-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET
Using one of the helper libraries, an equivalent Node.js request would look like:
1const accountSid = process.env.ACCOUNT_SID;2const apiKey = process.env.API_KEY_SID;3const apiKeySecret = process.env.API_KEY_SECRET;45const client = require('twilio')(6apiKey,7apiKeySecret,8{9accountSid: accountSid,10edge: 'dublin',11region: 'ie1'12}13);1415client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')16.verifications17.create({to: '+447440963594', channel: 'sna'})18.then(verification => console.log(verificaiton.sid));19
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 or Testing Guide documentation for more details.
Send a request to the 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.
1curl -X POST 'https://verify.dublin.ie1.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/VerificationCheck' \2--data-urlencode 'To=+447440963594' \3-u $TWILIO_API_KEY:$TWILIO_API_KEY_SECRET