• Connect your SIM to the network

    Assign a Rate Plan to a SIM card and activate it on the network.

    View docs
    • Java
    • Node
    • PHP
    • Python
    • Ruby
    • Curl
    import com.twilio.Twilio;
    import com.twilio.http.HttpMethod;
    import com.twilio.rest.wireless.v1.Sim;
    
    public class Example {
        // Find your Account Sid and Token at twilio.com/console
        public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        public static final String AUTH_TOKEN = "your_auth_token";
    
        public static void main(String[] args) {
            // Initialize the client
            Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
    
            Sim sim = Sim.updater("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
                    .setCallbackMethod(HttpMethod.POST)
                    .setCallbackUrl("https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter")
                    .setStatus(Sim.Status.ACTIVE)
                    .update();
    
            System.out.println(sim);
        }
    }
    // Download the Node helper library from twilio.com/docs/node/install
    // These consts are your accountSid and authToken from https://www.twilio.com/console
    const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
    const authToken = 'your_auth_token';
    const client = require('twilio')(accountSid, authToken);
    
    client.wireless
      .sims('DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
      .update({
        callbackMethod: 'POST',
        callbackUrl: 'https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter',
        status: 'active'
      })
      .then(function(response) {
        console.log(response);
      });
    wireless
        ->sims("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
        ->update([
            'status' => 'active',
            'callbackUrl' => 'https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter',
            'callbackMethod' => 'POST'
        ]);
    
    print_r($sim);
    # Download the Python helper library from twilio.com/docs/python/install
    from twilio.rest import Client
    
    # required for all twilio access tokens
    account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    auth_token = 'your_auth_token'
    
    client = Client(account_sid, auth_token)
    
    sim = client.wireless.sims('DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')\
            .update(status='active',
                    callback_url='https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter',
                    callback_method='POST')
    
    print(sim)
    # Get twilio-ruby from twilio.com/docs/ruby/install
    require 'twilio-ruby'
    
    # Get your Account SID and Auth Token from twilio.com/console
    account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    auth_token = 'your_auth_token'
    
    client = Twilio::REST::Client.new(account_sid, auth_token)
    
    sim = client.wireless
      .sims("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
      .update(
        status: 'active',
        callback_url: 'https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter',
        callback_method: 'POST'
      )
    
    puts sim
    curl -X POST https://wireless.twilio.com/v1/Sims/DEd3f4ec6c85ded1a5f64f10afc067895c \
        -d 'Status=active' \
        -d 'CallbackUrl=https://sim-manager.mycompany.com/sim-update-callback/AliceSmithSmartMeter' \
        -d 'CallbackMethod=POST' \
        -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:{AuthToken}'
  • Send M2M Commands

    Send and receive machine-to-machine Commands over the SMS channel.

    View docs
    • Java
    • Node
    • PHP
    • Python
    • Ruby
    • Curl
    import com.twilio.Twilio;
    import com.twilio.rest.wireless.v1.Command;
    
    public class Example {
        // Find your Account Sid and Token at twilio.com/console
        public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        public static final String AUTH_TOKEN = "your_auth_token";
    
        public static void main(String[] args) {
            // Initialize the client
            Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
    
            Command command = Command.creator("wakeup")
                .setSim("AliceSmithSmartMeter")
                .create();
    
            System.out.println(command);
        }
    }
    // Download the Node helper library from twilio.com/docs/node/install
    // These consts are your accountSid and authToken from https://www.twilio.com/console
    const accountSid = 'AC843a9ba05cf4835ea1bd10f9558b38eb';
    const authToken = 'your_auth_token';
    const client = require('twilio')(accountSid, authToken);
    
    client.wireless.commands
      .create({
        command: 'wakeup',
        sim: "AliceSmithSmartMeter"
      })
      .then(response => {
        console.log(response);
      });
    wireless
        ->commands
        ->create("wakeup", ["sim" => "AliceSmithSmartMeter"]);
    
    print_r($command);
    # Download the Python helper library from twilio.com/docs/python/install
    from twilio.rest import Client
    
    # required for all twilio access tokens
    account_sid = 'AC843a9ba05cf4835ea1bd10f9558b38eb'
    auth_token = 'your_auth_token'
    
    client = Client(account_sid, auth_token)
    
    client.wireless.commands \
        .create(command='wakeup', sim='AliceSmithSmartMeter')
    # Get twilio-ruby from twilio.com/docs/ruby/install
    require 'twilio-ruby'
    
    # Get your Account SID and Auth Token from twilio.com/console
    account_sid = 'AC843a9ba05cf4835ea1bd10f9558b38eb'
    auth_token = 'your_auth_token'
    
    client = Twilio::REST::Client.new(account_sid, auth_token)
    
    command = client.wireless.commands.create(
      command: "wakeup",
      sim: "AliceSmithSmartMeter"
    )
    puts command
    curl -X POST https://wireless.twilio.com/v1/Commands \
      -d 'Sim=AliceSmithSmartMeter' \
      -d 'Command=wakeup' \
      -u 'AC843a9ba05cf4835ea1bd10f9558b38eb:your_auth_token'
  • Track usage

    Retrieve usage statistics for your SIM.

    View docs
    • Java
    • Node
    • PHP
    • Python
    • Ruby
    • Curl
    import com.twilio.Twilio;
    import com.twilio.base.ResourceSet;
    import com.twilio.rest.wireless.v1.sim.UsageRecord;
    
    public class Example {
        // Find your Account Sid and Token at twilio.com/console
        public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        public static final String AUTH_TOKEN = "your_auth_token";
    
        public static void main(String[] args) {
            // Initialize the client
            Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
    
            ResourceSet usageRecords = UsageRecord
                    .reader("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").read();
    
            for (UsageRecord usageRecord : usageRecords) {
                System.out.println(usageRecord);
            }
        }
    }
    // Download the Node helper library from twilio.com/docs/node/install
    // These consts are your accountSid and authToken from https://www.twilio.com/console
    const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
    const authToken = 'your_auth_token';
    const client = require('twilio')(accountSid, authToken);
    
    client.wireless
      .sims('DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')
      .usageRecords
      .list()
      .then(function(response) {
        console.log(response);
      });
    wireless
        ->sims("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
        ->usageRecords
        ->read();
    
    print_r($usage);
    # Download the Python helper library from twilio.com/docs/python/install
    from twilio.rest import Client
    
    # required for all twilio access tokens
    account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    auth_token = 'your_auth_token'
    
    client = Client(account_sid, auth_token)
    
    ratePlanUsage = client.wireless.sims('DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')\
                    .usage_records.list()
    
    print(ratePlanUsage)
    # Get twilio-ruby from twilio.com/docs/ruby/install
    require 'twilio-ruby'
    
    # Get your Account SID and Auth Token from twilio.com/console
    account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
    auth_token = 'your_auth_token'
    
    client = Twilio::REST::Client.new(account_sid, auth_token)
    
    usage = client.wireless
      .sims("DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
      .usage_records
      .list()
    
    puts usage
    curl -G https://wireless.twilio.com/v1/Sims/DEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/UsageRecords \
        -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
The Twilio advantage
  • Communicate reliably

    Experience a 99.95% uptime SLA made possible with automated failover and zero-maintenance windows.

  • Operate at scale

    Extend the same app you write once to new markets with configurable features for localization and compliance.

  • Many channels

    Use the same platform you know for voice, SMS, video, chat, two-factor authentication, and more.

  • No shenanigans

    Get to market faster with pay-as-you-go pricing, free support, and the freedom to scale up or down without contracts.