简体   繁体   中英

Twilio with Silent Network Authentication

Would like to know any example (nodeJS) on the Silent Network Authentication feature with Twilio.

Also, can this be used to verify a local non-twilio telephone number and there by we can use the number as outgoing caller id?

Please help.

You can use the same method you would use for a "regular" verification request. The only thing you need to change is the channel parameter:

// Download the helper library from https://www.twilio.com/docs/node/install
// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('twilio')(accountSid, authToken);

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

You can find this and other snippets in the documentation .

Regarding the second question. Local numbers won't work as the SNA technology build on top of the standardized GSM (Global System for Mobile Communications) authentication.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM