メニュー

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?

TwiML™ Fax: <Receive>

The TwiML verb <Receive> instructs Twilio to receive an incoming fax. <Receive> accepts the fax and results in the creation of a new Fax instance resource.

オプションの要素の属性

属性 説明
action URL to consult when the fax has been received (or has failed)
method HTTP method to use when requesting the action URL; POST or GET. Defaults to POST.
mediaType The media type used to store media in the fax media store. Currently, supported values are: application/pdf (the default) and image/tiff.
pageSize What size to interpret received pages as (defaults to letter, US Letter). Supported values: letter, legal, and a4.
storeMedia Whether or not to store received media in the fax media store (defaults to true). If setting to false please see the below information.

        
        
        
        
        Faxを受信しURLエンドポイントを指定する

        Action URLを伴ってFaxを受信する

        Faxを受信しURLエンドポイントを指定する
              
              
              
              
              This code receives the incoming media and stores it on Twilio's servers in TIFF format. MediaUrl will point to the received media.

              TIFFでFax画像を保存する

              This code receives the incoming media and stores it on Twilio's servers in TIFF format. MediaUrl will point to the received media.

              アクションコールバック

              action が指定されている時、以下のパラメータを含むアクション callback が送信されます:

              パラメーター 説明
              FaxSid Faxに対する34文字の一意な識別子です
              AccountSid Faxが受信されたアカウントです
              From 送信元のFaxマシーンの電話番号で’す
              To Faxの受信に使用されたTwilio電話番号です
              RemoteStationId 送信側のFax機器からレポートされた送信元契約者識別子 (TSID = transmitting subscriber identification) です
              FaxStatus Fax伝送におけるステータスです
              ApiVersion The API version used to receive the fax (for this API: v1)
              NumPages If successful, the number of pages received
              MediaUrl 受信済のメディアの取得に使用できるTwilioのサーバーのメディアURLです。 URLは2時間で有効期限が切れることに注意してください。 新しいURLはFaxインスタンスリソースから取得できます。
              ErrorCode 存在する場合、問題についての詳細情報を提供するTwilioエラーコードです
              ErrorMessage 存在する場合、問題についての詳細メッセージです

              メディアストレージを避ける

              • If you are expecting sensitive material, you can specify storeMedia="false" as an attribute on this verb. Twilio will not store the media on our servers at all if so. Please note the following changes, limitations, and possible concerns.
              • You must specify an action callback with a POST method.
              • Instead of being provided a MediaUrl in the callback, the media file itself will be provided in a parameter called Media
              • The callback is sent using the multipart/form-data content-type (not application/x-www-form-urlencoded).
              • The media will be permanently deleted on Twilio's side after the callback is successfully delivered.
              • If we do not receive a 2xx HTTP response from your server, we will attempt to deliver the callback with the media every 2.5 minutes for up to 2 hours.
              • If we still have not received a 2xx response from your server after 2 hours, the media will be deleted.
              • Twilio still stores a metadata record of the received fax. If you wish to delete this record, you can do so using the REST API.
              Rate this page:

              ヘルプが必要ですか?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.