メニュー

Expand
ページを評価:

Per-Service Webhook Resource

The Per-Service Webhook resource allows you to control the effects of webhooks in a particular Conversation Service. The webhooks will only fire for activity at the service-level.

Services allow you to:

  • Create multiple, distinct environments (such as dev, stage, and prod) under a single Twilio account
  • REST API とクライアント API の両方を通じてリソースへのアクセスのスコープを設定する
  • Configure different service instances with specific behaviors

Every service can have unique webhook targets. This means you can include different metadata in the URLs or even trigger different behavior for different services.

Webhook targets for the Service Instance (the URL that Twilio will invoke) are configured in the Twilio Console.

If configured, service-scoped webhooks will override your global webhook settings such that only the service-scoped hooks will fire. This applies only to the services where service-level hooks are configured. See Conversations Webhooks for more information.

ServiceWebhookConfiguration properties

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

The unique ID of the Account responsible for this service.

chat_service_sid
sid<IS> Not PII

The unique ID of the Conversation Service this conversation belongs to.

pre_webhook_url
url Not PII

The absolute url the pre-event webhook request should be sent to.

post_webhook_url
url Not PII

The absolute url the post-event webhook request should be sent to.

filters
string[] Not PII

The list of events that your configured webhook targets will receive. Events not configured here will not fire. Possible values are onParticipantAdd, onParticipantAdded, onDeliveryUpdated, onConversationUpdated, onConversationRemove, onParticipantRemove, onConversationUpdate, onMessageAdd, onMessageRemoved, onParticipantUpdated, onConversationAdded, onMessageAdded, onConversationAdd, onConversationRemoved, onParticipantUpdate, onMessageRemove, onMessageUpdated, onParticipantRemoved, onMessageUpdate or onConversationStateUpdated.

method
enum:method Not PII

The HTTP method to be used when sending a webhook request. One of GET or POST.

url
url Not PII

An absolute API resource URL for this webhook.

Fetch a ServiceWebhookConfiguration resource

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

The unique ID of the Conversation Service this conversation belongs to.

例 1
        
        
        

        Update a ServiceWebhookConfiguration resource

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

        The unique ID of the Conversation Service this conversation belongs to.

        pre_webhook_url
        オプション
        post url Not PII

        The absolute url the pre-event webhook request should be sent to.

        post_webhook_url
        オプション
        post url Not PII

        The absolute url the post-event webhook request should be sent to.

        filters
        オプション
        post string[] Not PII

        The list of events that your configured webhook targets will receive. Events not configured here will not fire. Possible values are onParticipantAdd, onParticipantAdded, onDeliveryUpdated, onConversationUpdated, onConversationRemove, onParticipantRemove, onConversationUpdate, onMessageAdd, onMessageRemoved, onParticipantUpdated, onConversationAdded, onMessageAdded, onConversationAdd, onConversationRemoved, onParticipantUpdate, onMessageRemove, onMessageUpdated, onParticipantRemoved, onMessageUpdate or onConversationStateUpdated.

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

        The HTTP method to be used when sending a webhook request. One of GET or POST.

        例 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.

                    
                    
                    

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

                    Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                    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