skip to Main Content

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.

2

Answers


  1. 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 TwilioRestClient;
    
    // 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);
    
    Login or Signup to reply.
  2. Twilio developer evangelist here.

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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search