Twilio SMS verfication using Parse Cloud does not deliver

I am using Cloud Parse to send SMS for verification. this is my code cloud js im using

function sendCodeSms(countryCode, phoneNumber, code) {
    var promise = new Parse.Promise();
    twilio.sendSms({
        to: countryCode + phoneNumber,
        from: twilioPhoneNumber,
        body: 'Your login code for TestApp is ' + code
    }, function(err, responseData) {
        if (err) {
            console.log(err);
            promise.reject(err.message);
        } else {
            promise.resolve();
        }
    });
    return promise;
}

      

The Twilio Logs status says Submitted, but it is never delivered. Not sure what I am doing wrong? It worked fine 2 days ago.

Here is a screenshot http://i.imgur.com/iDUbzKC.png

+3


source to share


1 answer


Twilio developer evangelist is here.

This code looks correct and you get a Twilio message, so everything is fine.

The status "sent" means that the message was accepted by the carrier, but only if the message was "delivered", which the user should have received. See status values ​​here .



Another thing I noticed was that the number you posted in the screenshot was an Indian number. There are some restrictions on sending Indian numbers which you can read here .

If you're doing a phone check / two factor check, you might be interested in Authy , which makes these tasks easier than just using Twilio. It can also do the login code through an authenticator app rather than SMS, which can also be useful in this situation.

Let me know if it helps!

+1


source







All Articles