メニュー

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?

Interaction (インタラクション)

Interactions are read-only communications logs of a given Session. Each Interaction represents a single communication.

Interactions are composed of an inbound (to Twilio) and an outbound (from Twilio) leg. Interactions can have both inbound and outbound legs or be "one-sided" (like when creating a Message Interaction resource).

If a user sends an SMS to a proxy number, and Twilio Proxy handles the proxying to the other Participant, you'll have an Interaction with both an inbound SMS and an outbound SMS.

Interaction properties

Names in PHP format
sid
sid<KI> Not PII

A 34 character string that uniquely identifies this Interaction.

sessionSid
sid<KC> Not PII

The unique SID identifier of the parent Session.

serviceSid
sid<KS> Not PII

The unique SID identifier of the parent Service.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account.

data
文字列 PII MTL: 30 DAYS

JSON string that includes the message body of message interactions (e.g. {"body": "hello"}) or the call duration (when available) of a call (e.g. {"duration": "5"}).

type
enum:type Not PII

The Type of this Interaction. One of message, voice or unknown.

inboundParticipantSid
sid<KP> Not PII

The unique SID identifier of the Inbound Participant.

inboundResourceSid
sid Not PII

The unique SID identifier of the Inbound Resource (the Call or Message.

inboundResourceStatus
enum:resource_status Not PII

The Status of the Inbound Resource associated with this Interaction. One of accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered or unknown.

inboundResourceType
文字列 Not PII

The type of the Inbound Resource, Call or Message.

inboundResourceUrl
url Not PII

The URL of the Twilio inbound resource.

outboundParticipantSid
sid<KP> Not PII

The unique SID identifier of the Outbound Participant.

outboundResourceSid
sid Not PII

The unique SID identifier of the Outbound Resource (the Call or Message.

outboundResourceStatus
enum:resource_status Not PII

The Status of the Outbound Resource associated with this Interaction. One of accepted, answered, busy, canceled, completed, deleted, delivered, delivery-unknown, failed, in-progress, initiated, no-answer, queued, received, receiving, ringing, scheduled, sending, sent, undelivered or unknown.

outboundResourceType
文字列 Not PII

The type of the Outbound Resource, Call or Message.

outboundResourceUrl
url Not PII

The URL of the Twilio outbound resource.

dateCreated
date_time<iso8601> Not PII

The date that this Interaction was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Interaction was last updated, given in ISO 8601 format.

url
url Not PII

The URL of this resource.

Create an Interaction resource

You cannot POST to the Interactions resource. Instead, you can generate Interactions via the appropriate Participant's MessageInteraction resource. For details, see Sending Messages. Otherwise, Interactions are created automatically when Participants text or call each other.

Fetch an Interaction resource

GET
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
パラメーター
Names in None format
service_sid
必須
GET sid<KS> Not PII

The unique SID identifier of the parent Service.

session_sid
必須
GET sid<KC> Not PII

The unique SID identifier of the parent Session.

sid
必須
GET sid<KI> Not PII

A 34 character string that uniquely identifies this Interaction.

        
        
        
        

        Read multiple Interaction resources

        GET
        https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions

        Retrieve a list of Interactions for a given Session.

        パラメーター
        Names in None format
        service_sid
        必須
        GET sid<KS> Not PII

        The unique SID identifier of the parent Service.

        session_sid
        必須
        GET sid<KC> Not PII

        The unique SID identifier of the parent Session.

              
              
              
              

              Delete an Interaction resource

              削除する
              https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}

              Deleting an Interaction removes it permanently.

              Any Message or Call records created during this interaction will NOT be deleted automatically. If you want to delete all related Message/Call resources, you must issue direct DELETE requests for the inbound and outbound resources directly. Once you have deleted an interaction, those resource Sids will not be discoverable via Proxy.

              パラメーター
              Names in None format
              service_sid
              必須
              削除する sid<KS> Not PII

              The unique SID identifier of the parent Service.

              session_sid
              必須
              削除する sid<KC> Not PII

              The unique SID identifier of the parent Session.

              sid
              必須
              削除する sid<KI> Not PII

              A 34 character string that uniquely identifies this Interaction.

                    
                    
                    
                    
                    Rate this page:

                    ヘルプが必要ですか?

                    We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.