I am trying to make a sms Script from trello in laravel 5 this Show is error for from number is not valid
error "message": "The From phone number +(from number) is not a valid, SMS-capable inbound phone number or short code for your account.
But this works fine when I use shell script.
$sid = env('TWILIO_ACCOUNT_SID'); $token = env('TWILIO_AUTH_TOKEN');
$client = new Client($sid, $token);
$data = array(
'To' => "$tonumber",
'From'=>"$fnumber",
'Body'=> "newtestcurlphp"
);
$url = "https://api.twilio.com/2010-04-01/Accounts/$sid/SMS/Messages.json";
$post = http_build_query($data);
$x = curl_init($url );
curl_setopt($x, CURLOPT_POST, true);
curl_setopt($x, CURLOPT_RETURNTRANSFER, true);
curl_setopt($x, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($x, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($x, CURLOPT_USERPWD, "$sid:$token");
curl_setopt($x, CURLOPT_POSTFIELDS, $post);
$y = curl_exec($x);
curl_close($x);
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire