Commit 83f8d09 1 parent 3c6625f commit 83f8d09 Copy full SHA for 83f8d09
File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,19 @@ component singleton accessors="true" {
71
71
.setBody ( { " From" : arguments .from , " To" : arguments .to , " Body" : escapeNewlineCharacters ( arguments .body ) } );
72
72
}
73
73
74
+ /**
75
+ * Get the info of a SMS from Twilio
76
+ *
77
+ * @sid Id of the SMS
78
+ *
79
+ * @return s A configured HyperRequest instance. The return data is in field: data
80
+ */
81
+ function getSMS ( required string sid ) {
82
+ return newRequest ()
83
+ .setMethod ( " GET" )
84
+ .setUrl ( " /Accounts/#variables .accountSID #/Messages/#arguments .sid #.json" )
85
+ }
86
+
74
87
/**
75
88
* Initiate a phone call
76
89
*
Original file line number Diff line number Diff line change @@ -53,6 +53,22 @@ Send an sms message. Returns a configured `HyperRequest` instance.
53
53
| from | String | ` true ` | | The phone number the sms is from. This must be a valid Twilio number. |
54
54
| body | String | ` true ` | | The body of the sms message. |
55
55
56
+ #### getSMS
57
+
58
+ Get information of a SMS sent with Twilio
59
+
60
+ | Name | Type | Required? | Default | Description |
61
+ | ---- | ------ | --------- | ------- | --------------------------------------------------------------------- |
62
+ | sid | String | ` true ` | | Sid of the Message |
63
+
64
+ The information of the sms is in the field ` data ` as json of the returned object.
65
+ To get that information you need to deserialize it:
66
+
67
+ ```
68
+ responseObj = getSMS(sid);
69
+ smsData = deserializejson( responseObj.data );
70
+ ```
71
+
56
72
### Hyper Integration
57
73
58
74
The Twilio SDK uses the Hyper HTTP Client under the hood. This entire power is
You can’t perform that action at this time.
0 commit comments