Send SMS Command to a Sim.
Machine-to-machine SMS Commands sent to/from SIMs
Send SMS Command to a Sim.
Body
-
The
sid
orunique_name
of the SIM to send the SMS Command to. -
The message body of the SMS Command.
-
The HTTP method we should use to call
callback_url
. Can be:GET
orPOST
and the default is POST.Values are
GET
orPOST
. -
The URL we should call using the
callback_method
after we have sent the command.
POST
/v1/SmsCommands
curl \
--request POST 'https://supersim.twilio.com/v1/SmsCommands' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Sim=SimSidOrUniqueName&Payload=checkin%3A+firmware+update'
Request examples
Create command minimal
{"Sim"=>"SimSidOrUniqueName", "Payload"=>"checkin: firmware update"}
{"Sim"=>"SimSidOrUniqueName", "Payload"=>"Report location: (52.520008, 13.404954)", "CallbackUrl"=>"http://blahblah.com/go", "CallbackMethod"=>"POST"}
Response examples (201)
Create command minimal
{
"sid": "HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://supersim.twilio.com/v1/SmsCommands/HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"payload": "checkin: firmware update",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"direction": "to_sim",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z"
}
{
"sid": "HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://supersim.twilio.com/v1/SmsCommands/HCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"status": "queued",
"payload": "Report location: (52.520008, 13.404954)",
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"direction": "to_sim",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z"
}