サービスリソース
A Service is the top-level scope of all other resources in Notify REST API.
You can create up to 10 Service resources per account and you can use them to:
- Create separate operational environments, such as dev, stage, and prod, all using the same Twilio account.
- Scope access to resources used by the Notify REST API
- Configure different behaviors of a push-notification or messaging service.
If you need more than 10 Service resources for your account, please contact support.
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 RFC 2822 format. |
date_updated
|
The date and time in GMT when the resource was last updated specified in RFC 2822 format. |
apn_credential_sid
|
The SID of the Credential to use for APN Bindings. |
gcm_credential_sid
|
The SID of the Credential to use for GCM Bindings. |
fcm_credential_sid
|
The SID of the Credential to use for FCM Bindings. |
messaging_service_sid
|
The SID of the Messaging Service to use for SMS Bindings. In order to send SMS notifications this parameter has to be set. |
facebook_messenger_page_id
|
Deprecated. |
default_apn_notification_protocol_version
|
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
default_gcm_notification_protocol_version
|
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
default_fcm_notification_protocol_version
|
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
log_enabled
|
Whether to log notifications. Can be: |
url
|
The absolute URL of the Service resource. |
links
|
The URLs of the Binding, Notification, Segment, and User resources related to the service. |
alexa_skill_id
|
Deprecated. |
default_alexa_notification_protocol_version
|
Deprecated. |
delivery_callback_url
|
URL to send delivery status callback. |
delivery_callback_enabled
|
Callback configuration that enables delivery callbacks, default false |
Create a Service resource
https://notify.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. |
apn_credential_sid
オプション
|
The SID of the Credential to use for APN Bindings. |
gcm_credential_sid
オプション
|
The SID of the Credential to use for GCM Bindings. |
messaging_service_sid
オプション
|
The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications. |
facebook_messenger_page_id
オプション
|
Deprecated. |
default_apn_notification_protocol_version
オプション
|
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
default_gcm_notification_protocol_version
オプション
|
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
fcm_credential_sid
オプション
|
The SID of the Credential to use for FCM Bindings. |
default_fcm_notification_protocol_version
オプション
|
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
log_enabled
オプション
|
Whether to log notifications. Can be: |
alexa_skill_id
オプション
|
Deprecated. |
default_alexa_notification_protocol_version
オプション
|
Deprecated. |
delivery_callback_url
オプション
|
URL to send delivery status callback. |
delivery_callback_enabled
オプション
|
Callback configuration that enables delivery callbacks, default false |
例 1
Fetch a Service resource
https://notify.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies the Service resource to fetch. |
例 1
Read multiple Service resources
https://notify.twilio.com/v1/Services
パラメーター
Parameters in REST API format | |
---|---|
friendly_name
オプション
|
The string that identifies the Service resources to read. |
例 1
Update a Service resource
https://notify.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies 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. |
apn_credential_sid
オプション
|
The SID of the Credential to use for APN Bindings. |
gcm_credential_sid
オプション
|
The SID of the Credential to use for GCM Bindings. |
messaging_service_sid
オプション
|
The SID of the Messaging Service to use for SMS Bindings. This parameter must be set in order to send SMS notifications. |
facebook_messenger_page_id
オプション
|
Deprecated. |
default_apn_notification_protocol_version
オプション
|
The protocol version to use for sending APNS notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
default_gcm_notification_protocol_version
オプション
|
The protocol version to use for sending GCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
fcm_credential_sid
オプション
|
The SID of the Credential to use for FCM Bindings. |
default_fcm_notification_protocol_version
オプション
|
The protocol version to use for sending FCM notifications. Can be overridden on a Binding by Binding basis when creating a Binding resource. |
log_enabled
オプション
|
Whether to log notifications. Can be: |
alexa_skill_id
オプション
|
Deprecated. |
default_alexa_notification_protocol_version
オプション
|
Deprecated. |
delivery_callback_url
オプション
|
URL to send delivery status callback. |
delivery_callback_enabled
オプション
|
Callback configuration that enables delivery callbacks, default false |
例 1
Delete a Service resource
https://notify.twilio.com/v1/Services/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
sid
Path
|
The Twilio-provided string that uniquely identifies the Service resource to delete. |
例 1
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。