• Resolved vlassakos

    (@vlassakos)


    Hello,
    I am using Twilio for sending SMS, but I would like to add the Sender ID instead of the number. On Twilio Dashboard is everything ready and working but when i am creating a test from your plugin it still sends through the number and not through the Alphanumeric Sender ID.

    I tried to change the plugin a little, but I am receiving an error that there is no “from” number on the settings.

    Could you please help me on it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter vlassakos

    (@vlassakos)

    I hope that helps:

    <?php
    
    // Update the path below to your autoload.php,
    // see https://getcomposer.org/doc/01-basic-usage.md
    require_once '/path/to/vendor/autoload.php';
    
    use Twilio\Rest\Client;
    
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See https://twil.io/secure
    $sid = getenv("TWILIO_ACCOUNT_SID");
    $token = getenv("TWILIO_AUTH_TOKEN");
    $twilio = new Client($sid, $token);
    
    $message = $twilio->messages
                      ->create("+441632960675", // to
                               [
                                   "body" => "Phantom Menace was clearly the best of the prequel trilogy.",
                                   "messagingServiceSid" => "MG9752274e9e519418a7406176694466fa"
                               ]
                      );
    
    print($message->sid);
    
    Plugin Author Tareq Hasan

    (@tareq1988)

    Thanks for the report. We will add this future in a future release.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Alphanumeric Sender ID for Twilio SMS’ is closed to new replies.