Service Binding Resource
A Binding resource in Twilio Conversations 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).
Each Binding resource has the following properties:
Resource properties A 34 character string that uniquely identifies this resource.
chat_service_sid
type: SID<IS> Not PIIdate_created
type: string<DATE TIME> Not PIIThe date that this resource was created.
date_updated
type: string<DATE TIME> Not PIIThe date that this resource was last updated.
The unique endpoint identifier for the Binding. The format of this value depends on the binding_type
.
binding_type
type: enum<STRING> Not PIIPossible values:
apn
gcm
fcm
An absolute API resource URL for this binding.
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Bindings/{Sid}
URI parameters Path Parameter
A 34 character string that uniquely identifies this resource.
_11 // Download the helper library from https://www.twilio.com/docs/node/install
_11 // Find your Account SID and Auth Token at twilio.com/console
_11 // and set the environment variables. See http://twil.io/secure
_11 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11 const authToken = process.env.TWILIO_AUTH_TOKEN;
_11 const client = require('twilio')(accountSid, authToken);
_11 client.conversations.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .bindings('BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(binding => console.log(binding.sid));
_17 "sid": "BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17 "chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17 "date_created": "2016-10-21T11:37:03Z",
_17 "date_updated": "2016-10-21T11:37:03Z",
_17 "endpoint": "TestUser-endpoint",
_17 "identity": "TestUser",
_17 "binding_type": "gcm",
_17 "credential_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_17 "removed_from_conversation",
_17 "added_to_conversation"
_17 "url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings/BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Bindings
URI parameters Query Parameter
Possible values:
apn
gcm
fcm
Query Parameter
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Query Parameter
The page index. This value is simply for client state.
Query Parameter
The page token. This is provided by the API.
_11 // Download the helper library from https://www.twilio.com/docs/node/install
_11 // Find your Account SID and Auth Token at twilio.com/console
_11 // and set the environment variables. See http://twil.io/secure
_11 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_11 const authToken = process.env.TWILIO_AUTH_TOKEN;
_11 const client = require('twilio')(accountSid, authToken);
_11 client.conversations.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11 .then(bindings => bindings.forEach(b => console.log(b.sid)));
_30 "first_page_url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings?PageSize=50&Page=0",
_30 "previous_page_url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings?PageSize=50&Page=0",
_30 "url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings?PageSize=50&Page=0",
_30 "next_page_url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings?PageSize=50&Page=1",
_30 "sid": "BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30 "chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30 "date_created": "2016-10-21T11:37:03Z",
_30 "date_updated": "2016-10-21T11:37:03Z",
_30 "endpoint": "TestUser-endpoint",
_30 "identity": "TestUser",
_30 "binding_type": "gcm",
_30 "credential_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_30 "removed_from_conversation",
_30 "added_to_conversation"
_30 "url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Bindings/BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DELETE https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Bindings/{Sid}
URI parameters Path Parameter
The SID of the Binding resource to delete.
_10 // Download the helper library from https://www.twilio.com/docs/node/install
_10 // Find your Account SID and Auth Token at twilio.com/console
_10 // and set the environment variables. See http://twil.io/secure
_10 const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10 const authToken = process.env.TWILIO_AUTH_TOKEN;
_10 const client = require('twilio')(accountSid, authToken);
_10 client.conversations.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_10 .bindings('BSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')