Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Service Configuration Resource


The Configuration Resource represents all of the configuration settings for a Conversation Service, such as the default roles assigned to Users.


ServiceConfiguration Properties

serviceconfiguration-properties page anchor
Resource properties
chat_service_sidtype: SID<IS>Not PII

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


default_conversation_creator_role_sidtype: SID<RL>Not PII

The conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role(link takes you to an external page) for more info about roles.


default_conversation_role_sidtype: SID<RL>Not PII

The conversation-level role assigned to users when they are added to a conversation. See Conversation Role(link takes you to an external page) for more info about roles.


default_chat_service_role_sidtype: SID<RL>Not PII

The service-level role assigned to users when they are added to the service. See Conversation Role(link takes you to an external page) for more info about roles.


urltype: string<URI>Not PII

An absolute API resource URL for this service configuration.


linkstype: object<URI MAP>Not PII

Contains an absolute API resource URL to access the push notifications configuration of this service.


reachability_enabledtype: booleanNot PII

Whether the Reachability Indicator(link takes you to an external page) is enabled for this Conversations Service. The default is false.


Fetch a ServiceConfiguration resource

fetch-a-serviceconfiguration-resource page anchor
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration

Parameters

fetch-parameters page anchor
URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Service configuration resource to fetch.

Fetch a ServiceConfiguration

fetch-a-serviceconfiguration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_11
client.conversations.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_11
.configuration()
_11
.fetch()
_11
.then(configuration => console.log(configuration.chatServiceSid));

Output

_12
{
_12
"chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_conversation_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_conversation_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_chat_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"reachability_enabled": false,
_12
"url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration",
_12
"links": {
_12
"notifications": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Notifications",
_12
"webhooks": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Webhooks"
_12
}
_12
}


Update a ServiceConfiguration resource

update-a-serviceconfiguration-resource page anchor
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration

URI parameters
ChatServiceSidtype: SID<IS>Not PII
Path Parameter

The SID of the Service configuration resource to update.


Request body parameters
DefaultConversationCreatorRoleSidtype: SID<RL>Not PII

The conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role(link takes you to an external page) for more info about roles.


DefaultConversationRoleSidtype: SID<RL>Not PII

The conversation-level role assigned to users when they are added to a conversation. See Conversation Role(link takes you to an external page) for more info about roles.


DefaultChatServiceRoleSidtype: SID<RL>Not PII

The service-level role assigned to users when they are added to the service. See Conversation Role(link takes you to an external page) for more info about roles.


ReachabilityEnabledtype: booleanNot PII

Whether the Reachability Indicator(link takes you to an external page) is enabled for this Conversations Service. The default is false.

Update a ServiceConfiguration

update-a-serviceconfiguration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_13
// Download the helper library from https://www.twilio.com/docs/node/install
_13
// Find your Account SID and Auth Token at twilio.com/console
_13
// and set the environment variables. See http://twil.io/secure
_13
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13
const authToken = process.env.TWILIO_AUTH_TOKEN;
_13
const client = require('twilio')(accountSid, authToken);
_13
_13
client.conversations.v1.services('ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_13
.configuration()
_13
.update({
_13
defaultConversationCreatorRoleSid: 'RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
_13
})
_13
.then(configuration => console.log(configuration.chatServiceSid));

Output

_12
{
_12
"chat_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_conversation_creator_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_conversation_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"default_chat_service_role_sid": "RLXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"reachability_enabled": false,
_12
"url": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration",
_12
"links": {
_12
"notifications": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Notifications",
_12
"webhooks": "https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Webhooks"
_12
}
_12
}


Rate this page: