Nikhil Jacob
Nikhil Jacob

Reputation: 11

Services Twilio Rest Exception source phone number is not yet verified

Exception 'Services_Twilio_RestException' with message 'The source phone number provided, +91XXXXXXXXXX, is not yet verified for your account. You may only make calls from phone numbers that you've verified or purchased from Twilio.'

Upvotes: 0

Views: 952

Answers (1)

Ashish Patel
Ashish Patel

Reputation: 633

i think you are using a trial version of twilio. for that you have to register your mobile number first after login. then you will be able to send text on that registered mobile number only.

click on this link after login, you have to register that number there

require '/path/to/your/Twilio/autoload.php';   

use Twilio\Rest\Client;   

$sid = 'your_sid_here';
$token = 'your_token_here';
$client = new Client($sid, $token);
$from="get the sender number";
$to="registered mobile number";

$send=$client->messages->create(

    $to,
    array(

        'from' => $from,

        'body' => "your message here"
    )
);
if($send)
{
    print_r($send);

}
else
{
    echo "message not sent";
}

try to use this API with valid credentials.

Upvotes: 1

Related Questions