メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

メッセージの送信

We can send text messages through the Proxy API by creating a Message Interaction on a Participant. The referenced Participant will receive the message from their allocated proxy number on the appropriate channel.

Note: Only POST (create) is available on Message Interactions. To query past messages you've created with this resource, query the Interaction resource.

MessageInteraction properties

Resource Properties in REST API format
sid
sid<KI> Not PII

The unique string that we created to identify the MessageInteraction resource.

session_sid
sid<KC> Not PII

The SID of the parent Session resource.

service_sid
sid<KS> Not PII

The SID of the parent Service resource.

account_sid
sid<AC> Not PII

The SID of the Account that created the MessageInteraction resource.

data
文字列 PII MTL: 30 DAYS

A JSON string that includes the message body sent to the participant. (e.g. {"body": "hello"})

type
enum:type Not PII

The Type of Message Interaction. This value is always message.

participant_sid
sid<KP> Not PII

The SID of the Participant resource.

inbound_participant_sid
sid<KP> Not PII

Always empty for created Message Interactions.

inbound_resource_sid
sid Not PII

Always empty for created Message Interactions.

inbound_resource_status
enum:resource_status Not PII

Always empty for created Message Interactions.

inbound_resource_type
文字列 Not PII

Always empty for created Message Interactions.

inbound_resource_url
url Not PII

Always empty for created Message Interactions.

outbound_participant_sid
sid<KP> Not PII

The SID of the outbound Participant resource.

outbound_resource_sid
sid Not PII

The SID of the outbound Message resource.

outbound_resource_status
enum:resource_status Not PII

The outbound message resource status. Can be: accepted, deleted, delivered, delivery-unknown, failed, queued, received, receiving, scheduled, sending, sent, undelivered, or unknown.

outbound_resource_type
文字列 Not PII

The outbound resource type. This value is always Message.

outbound_resource_url
url Not PII

The URL of the Twilio message resource.

date_created
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was created.

date_updated
date_time<iso8601> Not PII

The ISO 8601 date and time in GMT when the resource was last updated.

url
url Not PII

The absolute URL of the MessageInteraction resource.

Create a MessageInteraction resource

post
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{ParticipantSid}/MessageInteractions
パラメーター
Parameters in REST API format
service_sid
Path
post sid<KS> Not PII

The SID of the parent Service resource.

session_sid
Path
post sid<KC> Not PII

The SID of the parent Session resource.

participant_sid
Path
post sid<KP> Not PII

The SID of the Participant resource.

body
Required if media_url is not passed
post 文字列 Not PII

The message to send to the participant

media_url
Required if body is not passed
post url[] Not PII

Reserved. Not currently supported.

例 1
        
        
        
        
        Rate this page:

        ヘルプが必要ですか?

        誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。