Skip to main content


Hi Support


I'm using javascript SDK for send SMS feature and app is under development mode. I'm getting 400 bad request when I post request for Send SMS. Here is my code

function send_sms($phone,$message){        
          $json_data = {            
"from": {
"phoneNumber": "+1000000000"
},
"to": [{
"phoneNumber": $phone
}],
"text": $message };
platform.post('/account/~/extension/~/sms',$json_data
).then(function(response) {
console.log(response.json());
//alert('Success: ' + response.json().id);
})
.catch(function(e) {
//alert('Error: ' + e.message);
});
}



Please let me know how to resolve this issue??


Thank you!



What is the error message?   'e.message'
I'm trying to send sms on wrong number that time I get 400 bad request.
Hi Tyler

I tried to send sms on right number then everything is ok. but when I get any error message like "International number not supported", etc then request became 400 bad. 


Thank you.
Hi AIRS,

It doesn't seem like a technical issue. The error message is clear: "International number not supported". Which means your account doesn't support sending message to international numbers.

You can contact the customer support to upgrade/configure your account if you are already a paid customer.

This devcommunity forum is for technical issues only so I am afraid that I cannot help your further.

Tyler

As it's already showing International number not supported error it's clear that you account doesn't have that privilege and you need to upgrade. If you can involve Dev support team regarding you account upgrade, you issue will be resolved


Reply