Service Configuration Resource
The Configuration Resource represents all of the configuration settings for a Conversation Service, such as the default roles assigned to Users.
The unique string that we created to identify the Service configuration resource.
^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34The conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34The conversation-level role assigned to users when they are added to a conversation. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34The service-level role assigned to users when they are added to the service. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34Contains an absolute API resource URL to access the push notifications configuration of this service.
Whether the Reachability Indicator is enabled for this Conversations Service. The default is false.
GET https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration
The SID of the Service configuration resource to fetch.
^IS[0-9a-fA-F]{32}$Min length: 34Max length: 341// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchServiceConfiguration() {11const configuration = await client.conversations.v112.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.configuration()14.fetch();1516console.log(configuration.chatServiceSid);17}1819fetchServiceConfiguration();
Response
1{2"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"reachability_enabled": false,7"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",8"links": {9"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",10"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"11}12}
POST https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Configuration
The SID of the Service configuration resource to update.
^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34application/x-www-form-urlencodedThe conversation-level role assigned to a conversation creator when they join a new conversation. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34The conversation-level role assigned to users when they are added to a conversation. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34The service-level role assigned to users when they are added to the service. See Conversation Role for more info about roles.
^RL[0-9a-fA-F]{32}$Min length: 34Max length: 34Whether the Reachability Indicator is enabled for this Conversations Service. The default is false.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateServiceConfiguration() {11const configuration = await client.conversations.v112.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")13.configuration()14.update({15defaultConversationCreatorRoleSid: "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",16});1718console.log(configuration.chatServiceSid);19}2021updateServiceConfiguration();
Response
1{2"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"default_conversation_creator_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"default_conversation_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"default_chat_service_role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",6"reachability_enabled": false,7"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",8"links": {9"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",10"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"11}12}