メニュー

Expand
ページを評価:

メッセージの送信

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
        
        
        
        ページを評価:

        ヘルプが必要ですか?

        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 Community Forums or browsing the Twilio tag on Stack Overflow.

              
              
              

              フィードバックくださりありがとうございます!

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

              Sending your feedback...
              🎉 Thank you for your feedback!
              Something went wrong. Please try again.

              Thanks for your feedback!

              Refer us and get $10 in 3 simple steps!

              ステップ1

              Get link

              Get a free personal referral link here

              ステップ2:

              Give $10

              Your user signs up and upgrade using link

              ステップ3

              Get $10

              1,250 free SMSes
              OR 1,000 free voice mins
              OR 12,000 chats
              OR more