OCaml bindings for Twilio API.
You can use bootstrap.sh to download and install the above.
You may optionally build an Lwt version of the Twilio client.
make
make install
If Lwt is installed, you may also run:
make lwt
Twilio_rest_request -- generates the URLs and POST data for the API
Twilio_rest -- binds together the request, HTTP client, and atd generated response parsers
Twilio_rest_convenience -- convenient module for making synchronous API requests
Twilio_rest_printer -- convenient module for printing API requests (no networking)
Additionally, the twilio-lwt package provices
Twilio_rest_lwt -- convenient module for making asynchronous API requests using Lwt
- Currently, only the REST API is provided
- This is still a preview release, not all API bindings are present or correct. Please submit issues or pull requests.
# module T = Twilio_rest_convenience.Make(struct
let account_sid = "FOO"
let auth_token = "BAR"
end);;
# T.Sms.Messages.get ();;
# T.Sms.Messages.post
~from_number:"6505551212"
~to_number:"4155551212"
~body:"Setting up my ocaml twilio bindings";;- For SSL requests with basic authorization -- i.e. how these bindings make requests --
Http_clientrequires that aGETbe made before aPOSTwill succeed.