we use Twilio (SMS sending platform) to send SMS via Parse Cloud Code. We create the following js method to perform that :
var client = require('twilio')(CONSTANTS.SMS_TWILIO_ACCOUNT_SID, CONSTANTS.SMS_TWILIO_AUTH_TOKEN);
function sendSMS(from, to, message, success, error) {
console.log("from:" + from + " to:" + to + " message:" +message);
client.sendSms({
to:to,
from: from,
body: message
}, function(err, responseData) {
if (err) {
error(err, responseData);
} else {
success(err, responseData);
}
});
}
This code work perfectly until this now. During this night, we received always the following error in Parse logs console :
{"status":0,"message":"Unable to complete HTTP request"}
On device, the error return by Parse contain code error 141 :
{"status":0,"message":"Unable to complete HTTP request"} (Code: 141, Version: 1.12.0)
I try to send SMS directly from Twilio Website and it work perfectly. Do think Parse have an issue with HTTP request send from Cloud Code?
Regards