Menu

Expand
Rate this page:

Verify Silent Network Auth Testing Guide

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.

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

Start a New SNA Verification

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

        
        
        

        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.

        Note its value for use in the next step:

        "sna": {
             "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"
        }

        Invoke the SNA URL

        Copy and paste the SNA URL and send it to yourself via email. Please note this cannot be done over Slack.

        SNA External Testing Email

        Before tapping the SNA URL, ensure that your mobile phone’s WiFi is turned off and that it is only using cellular data connection. Tap the SNA URL to continue the authentication process. It should open up in your default browser and after a processing time of four seconds or less, land on a screen that looks similar to this:

        Mobile phone web browser showing URL mi.dnlsrv.com and page body ErrorCode=0&ErrorDescription=Success&Carrier=VZW

        You can now exit the browser, no further action is required with the response shown on this screen.

        In real implementations, invoke the SNA URL using a POST request.

        We recommend using a POST request for real implementations rather than a GET request as is happening in this example, although both HTTP methods will have the same end result. POST requests have increased security due to not being cached in HTTP caches or browser history.

        Check the Verification Attempt result

        Next, send a request to the Verification Check API to confirm that the SNA URL invocation and Verification Attempt were successful.

              
              
              

              Check your response from the Verification Check API for the status property. approved means that SNA successfully confirmed user possession of the mobile number provided.

              "status": { "approved" }

              Check your response from the Verification Check API for the sna_attempts_error_codes property. If one or more errors occurred during the SNA process, you will see a list of error codes here. The attempt_sid property refers to the specific Verification Attempt that was created with the Start New Verification endpoint.

              You can check the Error and Warning Dictionary for more information on error codes including their possible causes and solutions.

              "sna_attempts_error_codes": [
                  {
                    "attempt_sid": "VLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                    "code": 60001
                  }
              Rate this page:

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                    
                    
                    

                    Thank you for your feedback!

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    Sending your feedback...
                    🎉 Thank you for your feedback!
                    Something went wrong. Please try again.

                    Thanks for your feedback!

                    Refer us and get $10 in 3 simple steps!

                    Step 1

                    Get link

                    Get a free personal referral link here

                    Step 2

                    Give $10

                    Your user signs up and upgrade using link

                    Step 3

                    Get $10

                    1,250 free SMSes
                    OR 1,000 free voice mins
                    OR 12,000 chats
                    OR more