Home > Software engineering >  How to get 'verify SID' in Twilio?
How to get 'verify SID' in Twilio?

Time:10-12

I have created an account in twilio and got SID and auth token. Where can I find the 'verify SID token' which is used for otp verification.

CodePudding user response:

You can find the SID of the Verify service in the console under "Verify > Service" and then in the table displayed there.

enter image description here

And then you can use this snippet from the documentation to use the service:

<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$verification = $twilio->verify->v2->services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                   ->verifications
                                   ->create(" 15017122661", "sms");

print($verification->sid);

CodePudding user response:

Twilio developer evangelist here.

You can see all your Verify Service SID's in your console here at this link!

  • Related