Service-Scoped Conversation Message Resource
Use the Service-scoped Conversation Message resource to interact with messages in Conversations that belong to a non-default, service-scoped Conversation resource.
Please see the Conversation Message Resource API Reference page for Messages that belong to Conversations in the default Conversation Service.
APIのベースURL
リファレンスドキュメントの URL はすべて、次のベース URL を使用しています。
https://conversations.twilio.com/v1
For Conversations applications that build on more than one Conversation Service instance, you will need to specify the Conversation Service SID in the REST API call:
GET /v1/Services/ISxx/Conversations/CHxx/Messages
Service-Scoped Conversation Message Properties
Resource Properties in REST API format | |
---|---|
account_sid
|
The unique ID of the Account responsible for this message. |
chat_service_sid
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
|
The unique ID of the Conversation for this message. |
sid
|
このリソースを一意に識別する 34 文字の文字列です。 |
index
|
The index of the message within the Conversation. |
author
|
The channel specific identifier of the message's author. Defaults to |
body
|
The content of the message, can be up to 1,600 characters long. |
media
|
An array of objects that describe the Message's media, if the message contains media. Each object contains these fields: |
attributes
|
A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned. |
participant_sid
|
The unique ID of messages's author participant. Null in case of |
date_created
|
このリソースの作成された日付です。 |
date_updated
|
このリソースが最後に更新された日付です。 編集されていない場合は |
delivery
|
An object that contains the summary of delivery statuses for the message to non-chat participants. |
url
|
An absolute API resource URL for this message. |
links
|
Contains an absolute API resource URL to access the delivery & read receipts of this message. |
Create a Service-Scoped Conversation Message resource
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages
パラメーター
Parameters in REST API format | |
---|---|
chat_service_sid
Path
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
Path
|
The unique ID of the Conversation for this message. |
author
オプション
|
The channel specific identifier of the message's author. Defaults to |
body
オプション
|
The content of the message, can be up to 1,600 characters long. |
date_created
オプション
|
このリソースの作成された日付です。 |
date_updated
オプション
|
このリソースが最後に更新された日付です。 編集されていない場合は |
attributes
オプション
|
A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned. |
media_sid
オプション
|
The Media SID to be attached to the new Message. |
x_twilio_webhook_enabled
ヘッダー
|
The X-Twilio-Webhook-Enabled HTTP request header |
例 1
Fetch a Service-Scoped Conversation Message resource
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
chat_service_sid
Path
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
Path
|
The unique ID of the Conversation for this message. |
sid
Path
|
このリソースを一意に識別する 34 文字の文字列です。 |
例 1
Read all Service-Scoped Conversation Message resources
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages
パラメーター
Parameters in REST API format | |
---|---|
chat_service_sid
Path
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
Path
|
The unique ID of the Conversation for messages. |
order
オプション
|
The sort order of the returned messages. Can be: |
例 1
Update a Service-Scoped Conversation Message resource
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
chat_service_sid
Path
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
Path
|
The unique ID of the Conversation for this message. |
sid
Path
|
このリソースを一意に識別する 34 文字の文字列です。 |
author
オプション
|
The channel specific identifier of the message's author. Defaults to |
body
オプション
|
The content of the message, can be up to 1,600 characters long. |
date_created
オプション
|
このリソースの作成された日付です。 |
date_updated
オプション
|
このリソースが最後に更新された日付です。 編集されていない場合は |
attributes
オプション
|
A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. Note that if the attributes are not set "{}" will be returned. |
x_twilio_webhook_enabled
ヘッダー
|
The X-Twilio-Webhook-Enabled HTTP request header |
例 1
Delete a Service-Scoped Conversation Message resource
https://conversations.twilio.com/v1/Services/{ChatServiceSid}/Conversations/{ConversationSid}/Messages/{Sid}
パラメーター
Parameters in REST API format | |
---|---|
chat_service_sid
Path
|
The SID of the Conversation Service the Participant resource is associated with. |
conversation_sid
Path
|
The unique ID of the Conversation for this message. |
sid
Path
|
このリソースを一意に識別する 34 文字の文字列です。 |
x_twilio_webhook_enabled
ヘッダー
|
The X-Twilio-Webhook-Enabled HTTP request header |
例 1
ヘルプが必要ですか?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.