Esempio n. 1
0
 public string sendOTP(string phoneNumber)
 {
     ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
     TwilioClient.Init(accountSid, authToken);
     CreateVerificationOptions options = new CreateVerificationOptions(serviceSid, phoneNumber, "sms");
     var verification = VerificationResource.Create(options);
     return verification.Status;
 }
Esempio n. 2
0
        public bool sendsms()
        {
            CreateVerificationOptions s = new CreateVerificationOptions("VA9d1daf8b5346fb512d19ce6da276ca23", _PhoneNumber, "sms");

            s.Locale = "en";
            var x = VerificationResource.Create(s);

            if (x.Status == "pending" || x.Status == "approved")
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }