メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Command Resource

To avoid ambiguity throughout this page, Sim (initial cap) refers to the Sim API resource. SIM (all caps) refers to the physical Subscriber Identity Module (that is, a SIM card) associated with a Sim resource.

Commands enable you can exchange simple machine-to-machine (M2M) messages with SMS-capable devices. Commands have a maximum length of 160 single-byte characters.

https://supersim.twilio.com/v1/Commands

To receive and process a Command sent to your device, you will interface with the modem directly, probably using AT Commands. You should consult with the GSM/LTE module manufacturer’s documentation on receiving SMS messages. Commands will be sent to your device from the Command short code phone number 000.

Commands will be stored up to 24 hours and retried until delivery confirmation is received.

At this stage of the Super SIM beta, Commands sent from a device (“mobile originated”) are not persisted and will not be readable from the Commands API, nor will will you receive a webhook to your Fleet resources CommandsUrl.

Asynchronous resource

The Command resource performs asynchronous operations.

During a later stage of the Super SIM Beta, you will be able to receive an asynchronous notification when a Command resource has finished updating by providing a callback URL and optionally a callback method parameter with your initial HTTP request to send a Command.

Command properties

Resource Properties in REST API format
sid
sid<HC> Not PII

The unique string that we created to identify the Command resource.

account_sid
sid<AC> Not PII

The SID of the Account that created the Command resource.

sim_sid
sid<HS> Not PII

The SID of the SIM that this Command was sent to or from.

command
文字列 PII MTL: 30 DAYS

The message body of the command sent to or from the SIM. For text mode messages, this can be up to 160 characters.

status
enum:status Not PII

The status of the Command. Can be: queued, sent, delivered, received or failed. See the Command Status Values for a description of each.

direction
enum:direction Not PII

The direction of the Command. Can be to_sim or from_sim. The value of to_sim is synonymous with the term mobile terminated, and from_sim is synonymous with the term mobile originated.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Command resource.

Create a Command resource

post
https://supersim.twilio.com/v1/Commands
パラメーター
Parameters in REST API format
sim
必須
post sid<HS> Not PII

The sid or unique_name of the SIM to send the Command to.

command
必須
post 文字列 PII MTL: 30 DAYS

The message body of the command.

callback_method
オプション
post http_method Not PII

The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST.

callback_url
オプション
post url Not PII

The URL we should call using the callback_method after we have sent the command.

例 1
        
        
        
        
        Rate this page:

        ヘルプが必要ですか?

        誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。