Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Verify Silent Network Auth Testing Guide


Test SNA Today

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.

Get Started

Verify Silent Network Auth (SNA) allows you to confirm user possession of a mobile phone number without explicit user intervention by communicating directly with mobile carriers. Learn more about how it works with SNA Overview, SNA API Reference, and What is Silent Network Authentication? blog post(link takes you to an external page).

In this guide, we will walk you through testing the entire SNA process step-by-step on your own mobile device without having to make any modifications to your mobile app.


Set up

set-up page anchor

You also have the option to test SNA without carrier approval or a valid Live Test Number. In this testing flow, use Twilio Region US1 for your requests to Start a New SNA Verification for any mobile number and Invoke the SNA URL as described in this guide. Note that requests made to regions outside US1 in this testing flow will fail. When you reach the Check the Verification Attempt result step, you will receive an expected error code.


Step 1: Start a New SNA Verification

step-1-start-a-new-sna-verification page anchor

To begin, use the Start New Verification endpoint with the parameter channel=sna to create a new SNA Verification.

Start a Verification With Silent Network Auth

start-a-verification-with-silent-network-auth page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_11
// Download the helper library from https://www.twilio.com/docs/node/install
_11
// Find your Account SID and Auth Token at twilio.com/console
_11
// and set the environment variables. See http://twil.io/secure
_11
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11
const authToken = process.env.TWILIO_AUTH_TOKEN;
_11
const client = require('twilio')(accountSid, authToken);
_11
_11
client.verify.v2.services('VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.verifications
_11
.create({to: '+15017122661', channel: 'sna'})
_11
.then(verification => console.log(verification.sid));

Output

_33
{
_33
"sid": "VEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_33
"service_sid": "VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_33
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_33
"to": "+15017122661",
_33
"channel": "sna",
_33
"status": "pending",
_33
"valid": false,
_33
"date_created": "2015-07-30T20:00:00Z",
_33
"date_updated": "2015-07-30T20:00:00Z",
_33
"lookup": {
_33
"carrier": {
_33
"mobile_country_code": "311",
_33
"type": "mobile",
_33
"error_code": null,
_33
"mobile_network_code": "180",
_33
"name": "T-Mobile USA, Inc."
_33
}
_33
},
_33
"amount": null,
_33
"payee": null,
_33
"send_code_attempts": [
_33
{
_33
"time": "2015-07-30T20:00:00Z",
_33
"channel": "sna",
_33
"attempt_sid": "VLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_33
}
_33
],
_33
"sna": {
_33
"url": "https://mi.dnlsrv.com/m/id/ANBByzx7?data=AAAglRRdNn02iTFWfDWwdTjOzM8o%2F6JB86fH%2Bt%2FFftUPj0pFA0u8%2FibWuYwzmMeMOtdTwYlsO8V%2FXF%2BJmngMhbeGKYhHeTOF2H9VrGEYKcEEklPxHgb5GgL3XtYa33j3lIU%2By6InvoV%2FowWHBzA0QeFPBh6vmJ8LoUPJqGE7q0PRz618Z4ym1AGq%2BaomSq9PlP4rCduv9Cmtxu%2FrvPSBwocs0GCWDE8seK8t9epmPQW7gwODxkAiKr9UxhJd9KvmBVuAQPf%2BoFQVo86USXkhXqTvUzB2bNUYY9FCy3CWgZFTOa1D3H1CVxf1eHzYIswNA7SmOzP%2FBX8g6%2B0hkzwMRkcit3gBNs4evAVJiqAgYvUlrtGwwv9bFx4X7jWSHY4%3D&cipherSalt=yANeDq09bwM38SJs"
_33
},
_33
"url": "https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Verifications/VEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_33
}

Check your response from the Start New Verification endpoint for the sna.url property. The SNA URL is unique for every Verification Attempt, has a default time-to-live of 10 minutes, and can only be processed once. Once it has been called, it will not be valid anymore.

Note its value for use in the next step:


_10
"sna": {
_10
"url": "https://mi.dnlsrv.com/m/id/ANBByzx7?data=AAAglRRdNn02iTFWfDWwdTjOzM8o%2F6JB86fH%2Bt%2FFftUPj0pFA0u8%2FibWuYwzmMeMOtdTwYlsO8V%2FXF%2BJmngMhbeGKYhHeTOF2H9VrGEYKcEEklPxHgb5GgL3XtYa33j3lIU%2By6InvoV%2FowWHBzA0QeFPBh6vmJ8LoUPJqGE7q0PRz618Z4ym1AGq%2BaomSq9PlP4rCduv9Cmtxu%2FrvPSBwocs0GCWDE8seK8t9epmPQW7gwODxkAiKr9UxhJd9KvmBVuAQPf%2BoFQVo86USXkhXqTvUzB2bNUYY9FCy3CWgZFTOa1D3H1CVxf1eHzYIswNA7SmOzP%2FBX8g6%2B0hkzwMRkcit3gBNs4evAVJiqAgYvUlrtGwwv9bFx4X7jWSHY4%3D&cipherSalt=yANeDq09bwM38SJs"
_10
}


Step 2: Invoke the SNA URL

step-2-invoke-the-sna-url page anchor

You can invoke the URL by sending it to yourself through either email or Slack following the *special instructions* below.

How to send the SNA URL via email

how-to-send-the-sna-url-via-email page anchor

Copy and paste the SNA URL and send it to yourself via email.

SNA External Testing Email.Rate this page:

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.