サービスリソース
公開ベータ
The Service Resource is currently available as a Public Beta product. This means that some features for configuring your Messaging Service via the REST API are not yet implemented, and others may be changed before the product is declared Generally Available. Messaging Service Configuration through the Twilio Console is Generally Available.
Public Beta products are not covered by a Twilio SLA.
The resources for sending Messages with a Messaging Service are Generally Available.
When sending a message with a Messaging Service, you can improve message performance by enabling the included features.
Developers can associate phone numbers, short codes, and alpha sender IDs to an instance of a Messaging Service. The Service handles all inbound and outbound behaviors for the phone numbers and shortcodes.
Twilio コンソール
Messaging ServiceはTwilio Consoleにログインして管理可能です。
Messaging Servicesリソース
MessagingのServicesリソースはメッセージの送受信に関係する一連の構成を表します。
サブリソース
ServicesリソースにはそのServiceに関連づけられた電話番号、ショートコード、および英文字の送信者IDを管理するためのphone numbers、shortcodes、およびalpha sender IDsサブリソースががあります。
リソースURI
このドキュメント中のすべてのURLは下記のベースURLを使用しています:
https://messaging.twilio.com/v1
Service properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Service resource. |
account_sid
|
The SID of the Account that created the Service resource. |
friendly_name
|
The string that you assigned to describe the resource. |
date_created
|
The date and time in GMT when the resource was created specified in ISO 8601 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in ISO 8601 format. |
inbound_request_url
|
The URL we call using |
inbound_method
|
The HTTP method we use to call |
fallback_url
|
The URL that we call using |
fallback_method
|
The HTTP method we use to call |
status_callback
|
The URL we call to pass status updates about message delivery. |
sticky_sender
|
Whether to enable Sticky Sender on the Service instance. |
mms_converter
|
Whether to enable the MMS Converter for messages sent through the Service instance. |
smart_encoding
|
Whether to enable Smart Encoding for messages sent through the Service instance. |
scan_message_content
|
Reserved. |
fallback_to_long_code
|
Whether to enable Fallback to Long Code for messages sent through the Service instance. |
area_code_geomatch
|
Whether to enable Area Code Geomatch on the Service Instance. |
synchronous_validation
|
Reserved. |
validity_period
|
How long, in seconds, messages sent from the Service are valid. Can be an integer from |
url
|
The absolute URL of the Service resource. |
links
|
The absolute URLs of related resources. |
usecase
|
A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] |
us_app_to_person_registered
|
Whether US A2P campaign is registered for this Service. |
use_inbound_webhook_on_number
|
A boolean value that indicates either the webhook url configured on the phone number will be used or |
Create a Service resource
https://messaging.twilio.com/v1/Services
パラメーター
Parameters in REST API format | |
---|---|
friendly_name
必須
|
A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
inbound_request_url
オプション
|
The URL we call using |
inbound_method
オプション
|
The HTTP method we should use to call |
fallback_url
オプション
|
The URL that we call using |
fallback_method
オプション
|
The HTTP method we should use to call |
status_callback
オプション
|
The URL we should call to pass status updates about message delivery. |
sticky_sender
オプション
|
Whether to enable Sticky Sender on the Service instance. |
mms_converter
オプション
|
Whether to enable the MMS Converter for messages sent through the Service instance. |
smart_encoding
オプション
|
Whether to enable Smart Encoding for messages sent through the Service instance. |
scan_message_content
オプション
|
Reserved. |
fallback_to_long_code
オプション
|
Whether to enable Fallback to Long Code for messages sent through the Service instance. |
area_code_geomatch
オプション
|
Whether to enable Area Code Geomatch on the Service Instance. |
validity_period
オプション
|
How long, in seconds, messages sent from the Service are valid. Can be an integer from |
synchronous_validation
オプション
|
Reserved. |
usecase
オプション
|
A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..]. |
use_inbound_webhook_on_number
オプション
|
A boolean value that indicates either the webhook url configured on the phone number will be used or |
例 1
Fetch a Service resource
https://messaging.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to fetch. |
例 1
Read multiple Service resources
https://messaging.twilio.com/v1/Services
例 1
Update a Service resource
https://messaging.twilio.com/v1/Services/{Sid}
1つ以上の上記のオプションパラメーターを指定して、Serviceの対応するプロパティーを更新できます。 リクエストで指定されなかったパラメーターは更新されません。
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to update. |
friendly_name
オプション
|
A descriptive string that you create to describe the resource. It can be up to 64 characters long. |
inbound_request_url
オプション
|
The URL we call using |
inbound_method
オプション
|
The HTTP method we should use to call |
fallback_url
オプション
|
The URL that we call using |
fallback_method
オプション
|
The HTTP method we should use to call |
status_callback
オプション
|
The URL we should call to pass status updates about message delivery. |
sticky_sender
オプション
|
Whether to enable Sticky Sender on the Service instance. |
mms_converter
オプション
|
Whether to enable the MMS Converter for messages sent through the Service instance. |
smart_encoding
オプション
|
Whether to enable Smart Encoding for messages sent through the Service instance. |
scan_message_content
オプション
|
Reserved. |
fallback_to_long_code
オプション
|
Whether to enable Fallback to Long Code for messages sent through the Service instance. |
area_code_geomatch
オプション
|
Whether to enable Area Code Geomatch on the Service Instance. |
validity_period
オプション
|
How long, in seconds, messages sent from the Service are valid. Can be an integer from |
synchronous_validation
オプション
|
Reserved. |
usecase
オプション
|
A string that describes the scenario in which the Messaging Service will be used. Examples: [notification, marketing, verification, poll ..] |
use_inbound_webhook_on_number
オプション
|
A boolean value that indicates either the webhook url configured on the phone number will be used or |
例 1
Delete a Service resource
https://messaging.twilio.com/v1/Services/{Sid}
Serviceが削除されるとき、Service内のすべての電話番号およびショートコードはアカウントに戻ります。
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The SID of the Service resource to delete. |
例 1
ヘルプが必要ですか?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.