Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
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?

Binding Resource

A Binding resource of Programmable Chat represents a push notification subscription for a User within their Service instance. Bindings are unique per service instance, user identity, device, and notification channel (such as APNS, GCM, FCM).

Binding properties

Each Binding resource contains these properties.

Names in PHP format
sid
sid<BS> Not PII

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

accountSid
sid<AC> Not PII

The SID of the Account that created the Binding resource.

serviceSid
sid<IS> Not PII

The SID of the Service the Binding resource is associated with.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

endpoint

The unique endpoint identifier for the Binding. The format of this value depends on the binding_type.

identity

The application-defined string that uniquely identifies the resource's User within the Service. See access tokens for more info.

credentialSid
sid<CR> Not PII

The SID of the Credential for the binding. See push notification configuration for more info.

bindingType
enum:binding_type Not PII

The push technology to use for the Binding. Can be: apn, gcm, or fcm. See push notification configuration for more info.

messageTypes
string[] Not PII

The Programmable Chat message types the binding is subscribed to.

url
url Not PII

The absolute URL of the Binding resource.

links
uri_map Not PII

The absolute URLs of the Binding's User.

Fetch a Binding resource

get
https://chat.twilio.com/v2/Services/{ServiceSid}/Bindings/{Sid}
Parameters
Names in None format
service_sid
Required
get sid<IS> Not PII

The SID of the Service to fetch the Binding resource from.

sid
Required
get sid<BS> Not PII

The SID of the Binding resource to fetch.

Example 1
        
        
        
        

        Read multiple Binding resources

        get
        https://chat.twilio.com/v2/Services/{ServiceSid}/Bindings
        Parameters
        Names in None format
        service_sid
        Required
        get sid<IS> Not PII

        The SID of the Service to read the Binding resources from.

        binding_type
        Optional
        get enum:binding_type[] Not PII

        The push technology used by the Binding resources to read. Can be: apn, gcm, or fcm. See push notification configuration for more info.

        identity
        Optional
        get string[] PII MTL: 120 DAYS

        The User's identity value of the resources to read. See access tokens for more details.

        Example 1
              
              
              
              

              Delete a Binding resource

              delete
              https://chat.twilio.com/v2/Services/{ServiceSid}/Bindings/{Sid}
              Parameters
              Names in None format
              service_sid
              Required
              delete sid<IS> Not PII

              The SID of the Service to delete the Binding resource from.

              sid
              Required
              delete sid<BS> Not PII

              The SID of the Binding resource to delete.

              Example 1
                    
                    
                    
                    
                    Rate this page:

                    Need some help?

                    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.