Create member
Users joined to specific channels
Body
-
The
identity
value that uniquely identifies the new resource's User within the Service. See access tokens for more info. -
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^RL[0-9a-fA-F]{32}$
. -
The date, specified in ISO 8601 format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source.
-
The date, specified in ISO 8601 format, to assign to the resource as the date it was last updated. The default value is
null
. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated. -
A valid JSON string that contains application-specific data.
curl \
--request POST 'https://chat.twilio.com/v2/Services/{ServiceSid}/Channels/{ChannelSid}/Members' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--header "X-Twilio-Webhook-Enabled: true" \
--data 'Identity=Twilio&Attributes=%7B%7D'
{"Identity"=>"Twilio", "Attributes"=>"{}"}
{
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"identity": "jing",
"role_sid": "RLaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"attributes": "{}",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T21:05:50Z",
"date_updated": "2016-03-24T21:05:50Z",
"last_consumption_timestamp": null,
"last_consumed_message_index": null
}