You are viewing the Japanese site, but your language preference is set to English. Switch to English site →

Menu

Expand
このページを評価:

メッセージング用ショートコード

ショートコードとは、携帯電話でメッセージを送受信できる5桁または6桁の番号です。スループットの高いこれらの番号は、多数のユーザー宛てのメッセージ送信や、緊急メッセージ送信用アプリに最適です。ご利用には、ショートコードをTwilioから購入するか、既存のショートコードをTwilioプラットフォームに移植する必要があります。

ショートコードを使用してメッセージを送信する方法については、「メッセージ送信」ドキュメントをご覧ください。

ShortCode properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created this ShortCode resource.

api_version
string Not PII

The API version used to start a new TwiML session when an SMS message is sent to this short code.

date_created
date_time<rfc2822> Not PII

The date and time in GMT that this resource was created specified in RFC 2822 format.

date_updated
date_time<rfc2822> Not PII

The date and time in GMT that this resource was last updated, specified in RFC 2822 format.

friendly_name
string Not PII

A string that you assigned to describe this resource. By default, the FriendlyName is the short code.

short_code
string Not PII

The short code. e.g., 894546.

sid
sid<SC> Not PII

The unique string that that we created to identify this ShortCode resource.

sms_fallback_method
http_method Not PII

The HTTP method we use to call the sms_fallback_url. Can be: GET or POST.

sms_fallback_url
url Not PII

The URL that we call if an error occurs while retrieving or executing the TwiML from sms_url.

sms_method
http_method Not PII

The HTTP method we use to call the sms_url. Can be: GET or POST.

sms_url
url Not PII

The URL we call when receiving an incoming SMS message to this short code.

uri
uri Not PII

The URI of this resource, relative to https://api.twilio.com.

Fetch a ShortCode resource

get
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
Parameters
Parameters in REST API format
account_sid
Path
get sid<AC> Not PII

The SID of the Account that created the ShortCode resource(s) to fetch.

sid
Path
get sid<SC> Not PII

The Twilio-provided string that uniquely identifies the ShortCode resource to fetch

Example 1
Loading Code Sample...
        
        

        Fetch Short Code

        Read multiple ShortCode resources

        get
        https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json

        アカウント内のショートコードのリストを返します。このリストは、ページネーションされます。

        フィルタリング

        以下のクエリ条件に合致したショートコードを取得します。

        Parameters
        Parameters in REST API format
        account_sid
        Path
        get sid<AC> Not PII

        The SID of the Account that created the ShortCode resource(s) to read.

        friendly_name
        Optional
        get string Not PII

        The string that identifies the ShortCode resources to read.

        short_code
        Optional
        get string Not PII

        Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.

        Example 1
        Loading Code Sample...
              
              

              読み込み: アカウント内のすべてのショートコードを表示する

              Example 2
              Loading Code Sample...
                    
                    
                    「67898」に一致するショートコードの情報を表示します。

                    読み込み: 完全一致したショートコードを表示する

                    「67898」に一致するショートコードの情報を表示します。
                    Example 3
                    Loading Code Sample...
                          
                          
                          「898」が含まれるすべてのショートコードを返します。

                          読み込み: 部分一致したショートコードを表示する

                          「898」が含まれるすべてのショートコードを返します。

                          Update a ShortCode resource

                          post
                          https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json

                          ショートコードのプロパティを更新します。このAPI呼び出しは、呼び出しが成功すると、更新済みの情報を返します。返される応答は、GETリクエストの作成時に返される内容と同じです。

                          Parameters
                          Parameters in REST API format
                          account_sid
                          Path
                          post sid<AC> Not PII

                          The SID of the Account that created the ShortCode resource(s) to update.

                          sid
                          Path
                          post sid<SC> Not PII

                          The Twilio-provided string that uniquely identifies the ShortCode resource to update

                          friendly_name
                          Optional
                          post string Not PII

                          A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the FriendlyName is the short code.

                          api_version
                          Optional
                          post string Not PII

                          The API version to use to start a new TwiML session. Can be: 2010-04-01 or 2008-08-01.

                          sms_url
                          Optional
                          post url Not PII

                          The URL we should call when receiving an incoming SMS message to this short code.

                          sms_method
                          Optional
                          post http_method Not PII

                          The HTTP method we should use when calling the sms_url. Can be: GET or POST.

                          sms_fallback_url
                          Optional
                          post url Not PII

                          The URL that we should call if an error occurs while retrieving or executing the TwiML from sms_url.

                          sms_fallback_method
                          Optional
                          post http_method Not PII

                          The HTTP method that we should use to call the sms_fallback_url. Can be: GET or POST.

                          Example 1
                          Loading Code Sample...
                                
                                
                                ショートコードのSMS Urlを「http://demo.twilio.com/docs/sms.xml」に設定します。

                                更新: ショートコードを更新するパラメーター

                                ショートコードのSMS Urlを「http://demo.twilio.com/docs/sms.xml」に設定します。
                                このページを評価:

                                サポートが必要ですか?

                                コーディングに関するご質問、ご不明点等ございましたら、お問い合わせからご連絡いただくか、TwilioのStack Overflow Collectiveにアクセスいただくか、Stack OverflowサイトでTwilioタグを検索してください。

                                Loading Code Sample...
                                      
                                      
                                      

                                      フィードバックいただき、ありがとうございました。

                                      フィードバックいただいた理由を選択してください。その他、ご意見をいただければ、今後のドキュメントの改善に役立てさせていただきます。

                                      フィードバックを送信中...
                                      🎉 フィードバックいただき、ありがとうございました。
                                      何らかの問題が発生しました。もう一度試してください。

                                      フィードバックいただき、ありがとうございました。

                                      thanks-feedback-gif