Send an IP Command to a Super SIM.
Machine-to-machine IP Commands sent to/from Super SIMs
Send an IP Command to a Super SIM.
Body
-
The
sid
orunique_name
of the Super SIM to send the IP Command to. -
The data that will be sent to the device. The payload cannot exceed 1300 bytes. If the PayloadType is set to text, the payload is encoded in UTF-8. If PayloadType is set to binary, the payload is encoded in Base64.
-
The device port to which the IP Command will be sent.
-
Either “text” or “binary”. For an IP Command sent to a Super SIM,
payload_type
is configurable. For an IP Command sent from a Super SIM,payload_type
is always “binary”.Values are
text
orbinary
. -
The URL we should call using the
callback_method
after we have sent the IP Command. -
The HTTP method we should use to call
callback_url
. Can beGET
orPOST
, and the default isPOST
.Values are
GET
orPOST
.
curl \
--request POST 'https://supersim.twilio.com/v1/IpCommands' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Sim=sim&Payload=checkin%3A+firmware+update&DevicePort=100&CallbackUrl=http%3A%2F%2Fwww.example.com&PayloadType=text&CallbackMethod=GET'
{"Sim"=>"sim", "Payload"=>"checkin: firmware update", "DevicePort"=>100, "CallbackUrl"=>"http://www.example.com", "PayloadType"=>"text", "CallbackMethod"=>"GET"}
{"Sim"=>"sim", "Payload"=>"checkin: firmware update", "DevicePort"=>100}
{
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"payload": "checkin: firmware update",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"device_ip": "100.64.0.123",
"direction": "to_sim",
"sim_iccid": "89883070000123456789",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"device_port": 100,
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"payload_type": "text"
}
{
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"payload": "checkin: firmware update",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"device_ip": "100.64.0.123",
"direction": "to_sim",
"sim_iccid": "89883070000123456789",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"device_port": 100,
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"payload_type": "text"
}