メニュー

Expand
ページを評価:

サービスリソース

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
sid<IS> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Service resource.

friendly_name
文字列 Not PII

The string that you assigned to describe the resource.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

apn_credential_sid
sid<CR> Not PII

The SID of the Credential to use for APN Bindings.

gcm_credential_sid
sid<CR> Not PII

The SID of the Credential to use for GCM Bindings.

fcm_credential_sid
sid<CR> Not PII

The SID of the Credential to use for FCM Bindings.

messaging_service_sid
sid<MG> Not PII

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
文字列 Not PII

Deprecated.

default_apn_notification_protocol_version
文字列 Not PII

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
文字列 Not PII

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
文字列 Not PII

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
boolean Not PII

Whether to log notifications. Can be: true or false and the default is true.

url
url Not PII

The absolute URL of the Service resource.

links
uri_map Not PII

The URLs of the Binding, Notification, Segment, and User resources related to the service.

alexa_skill_id
文字列 Not PII

Deprecated.

default_alexa_notification_protocol_version
文字列 Not PII

Deprecated.

delivery_callback_url
文字列 Not PII

URL to send delivery status callback.

delivery_callback_enabled
boolean Not PII

Callback configuration that enables delivery callbacks, default false

Create a Service resource

post
https://notify.twilio.com/v1/Services
パラメーター
Parameters in REST API format
friendly_name
オプション
post 文字列 Not PII

A descriptive string that you create to describe the resource. It can be up to 64 characters long.

apn_credential_sid
オプション
post sid<CR> Not PII

The SID of the Credential to use for APN Bindings.

gcm_credential_sid
オプション
post sid<CR> Not PII

The SID of the Credential to use for GCM Bindings.

messaging_service_sid
オプション
post sid<MG> Not PII

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
オプション
post 文字列 Not PII

Deprecated.

default_apn_notification_protocol_version
オプション
post 文字列 Not PII

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
オプション
post 文字列 Not PII

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
オプション
post sid<CR> Not PII

The SID of the Credential to use for FCM Bindings.

default_fcm_notification_protocol_version
オプション
post 文字列 Not PII

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
オプション
post boolean Not PII

Whether to log notifications. Can be: true or false and the default is true.

alexa_skill_id
オプション
post 文字列 Not PII

Deprecated.

default_alexa_notification_protocol_version
オプション
post 文字列 Not PII

Deprecated.

delivery_callback_url
オプション
post 文字列 Not PII

URL to send delivery status callback.

delivery_callback_enabled
オプション
post boolean Not PII

Callback configuration that enables delivery callbacks, default false

例 1
        
        
        

        Fetch a Service resource

        GET
        https://notify.twilio.com/v1/Services/{Sid}
        パラメーター
        Parameters in REST API format
        sid
        Path
        GET sid<IS> Not PII

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

        例 1
              
              
              

              Read multiple Service resources

              GET
              https://notify.twilio.com/v1/Services
              パラメーター
              Parameters in REST API format
              friendly_name
              オプション
              GET 文字列 Not PII

              The string that identifies the Service resources to read.

              例 1
                    
                    
                    

                    Update a Service resource

                    post
                    https://notify.twilio.com/v1/Services/{Sid}
                    パラメーター
                    Parameters in REST API format
                    sid
                    Path
                    post sid<IS> Not PII

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

                    friendly_name
                    オプション
                    post 文字列 Not PII

                    A descriptive string that you create to describe the resource. It can be up to 64 characters long.

                    apn_credential_sid
                    オプション
                    post sid<CR> Not PII

                    The SID of the Credential to use for APN Bindings.

                    gcm_credential_sid
                    オプション
                    post sid<CR> Not PII

                    The SID of the Credential to use for GCM Bindings.

                    messaging_service_sid
                    オプション
                    post sid<MG> Not PII

                    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
                    オプション
                    post 文字列 Not PII

                    Deprecated.

                    default_apn_notification_protocol_version
                    オプション
                    post 文字列 Not PII

                    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
                    オプション
                    post 文字列 Not PII

                    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
                    オプション
                    post sid<CR> Not PII

                    The SID of the Credential to use for FCM Bindings.

                    default_fcm_notification_protocol_version
                    オプション
                    post 文字列 Not PII

                    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
                    オプション
                    post boolean Not PII

                    Whether to log notifications. Can be: true or false and the default is true.

                    alexa_skill_id
                    オプション
                    post 文字列 Not PII

                    Deprecated.

                    default_alexa_notification_protocol_version
                    オプション
                    post 文字列 Not PII

                    Deprecated.

                    delivery_callback_url
                    オプション
                    post 文字列 Not PII

                    URL to send delivery status callback.

                    delivery_callback_enabled
                    オプション
                    post boolean Not PII

                    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
                          削除する sid<IS> Not PII

                          The Twilio-provided string that uniquely identifies 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 Community Forums or browsing the Twilio tag on Stack Overflow.

                                      
                                      
                                      

                                      フィードバックくださりありがとうございます!

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

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      ステップ1

                                      Get link

                                      Get a free personal referral link here

                                      ステップ2:

                                      Give $10

                                      Your user signs up and upgrade using link

                                      ステップ3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more