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
|
A 34 character string that uniquely identifies this Interaction. |
sessionSid
|
The unique SID identifier of the parent Session. |
serviceSid
|
The unique SID identifier of the parent Service. |
accountSid
|
The unique SID identifier of the Account. |
data
|
JSON string that includes the message body of message interactions (e.g. |
type
|
The Type of this Interaction. One of |
inboundParticipantSid
|
The unique SID identifier of the Inbound Participant. |
inboundResourceSid
|
The unique SID identifier of the Inbound Resource (the Call or Message. |
inboundResourceStatus
|
The Status of the Inbound Resource associated with this Interaction. One of |
inboundResourceType
|
|
inboundResourceUrl
|
The URL of the Twilio inbound resource. |
outboundParticipantSid
|
The unique SID identifier of the Outbound Participant. |
outboundResourceSid
|
The unique SID identifier of the Outbound Resource (the Call or Message. |
outboundResourceStatus
|
The Status of the Outbound Resource associated with this Interaction. One of |
outboundResourceType
|
|
outboundResourceUrl
|
The URL of the Twilio outbound resource. |
dateCreated
|
The date that this Interaction was created, given in ISO 8601 format. |
dateUpdated
|
The date that this Interaction was last updated, given in ISO 8601 format. |
url
|
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
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Interactions/{Sid}
パラメーター
Names in None format | |
---|---|
service_sid
必須
|
The unique SID identifier of the parent Service. |
session_sid
必須
|
The unique SID identifier of the parent Session. |
sid
必須
|
A 34 character string that uniquely identifies this Interaction. |
例
Read multiple Interaction resources
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
必須
|
The unique SID identifier of the parent Service. |
session_sid
必須
|
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
必須
|
The unique SID identifier of the parent Service. |
session_sid
必須
|
The unique SID identifier of the parent Session. |
sid
必須
|
A 34 character string that uniquely identifies this Interaction. |
例
ヘルプが必要ですか?
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.