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?

User Binding Resource

The User Binding resource provides access to Binding resources that is scoped to a single User.

UserBinding properties

Each User Binding resource contains these properties.

Names in PHP format
sid
sid<BS> Not PII

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

accountSid
sid<AC> Not PII

The SID of the Account that created the User Binding resource.

serviceSid
sid<IS> Not PII

The SID of the Service the User 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 User Binding. The format of the 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.

userSid
sid<US> Not PII

The SID of the User with the User Binding resource. See push notification configuration 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 User 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 User Binding resource.

Fetch a User Binding resource

get
https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}

The {UserSid} value can be either the sid or the identity of the User resource to fetch the User Binding resource from.

Parameters
Names in None format
service_sid
Required
get sid<IS> Not PII

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

user_sid
Required
get sid_like<US> Not PII

The SID of the User with the User Binding resource to fetch. See push notification configuration for more info.

sid
Required
get sid<BS> Not PII

The SID of the User Binding resource to fetch.

Example 1
        
        
        
        

        Read multiple UserBinding resources

        get
        https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings

        The {UserSid} value can be either the sid or the identity of the User resource to read User Binding resources from.

        Parameters
        Names in None format
        service_sid
        Required
        get sid<IS> Not PII

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

        user_sid
        Required
        get sid_like<US> Not PII

        The SID of the User with the User Binding resources to read. See push notification configuration for more info.

        binding_type
        Optional
        get enum:binding_type[] Not PII

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

        Example 1
              
              
              
              

              Delete a User Binding resource

              delete
              https://chat.twilio.com/v2/Services/{ServiceSid}/Users/{UserSid}/Bindings/{Sid}

              The {UserSid} value can be either the sid or the identity of the User resource to delete the User Channel resource from.

              Parameters
              Names in None format
              service_sid
              Required
              delete sid<IS> Not PII

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

              user_sid
              Required
              delete sid_like<US> Not PII

              The SID of the User with the User Binding resources to delete. See push notification configuration for more info.

              sid
              Required
              delete sid<BS> Not PII

              The SID of the User 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.