Unknown domain verify when using send verification code

30 Views Asked by At

'I'm using this code

public function sendVerification($phone) {
      
        $sid = 'mysid';
        $token = 'mytoken';
        $tokenService = 'verification_token';

        $twilio = new Twilio\Rest\Client($sid, $token);

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

        return $verification;

    }

I'm getting

Unknown domain verify : Twilio\Rest\Client->__get('verify')

0

There are 0 best solutions below