Twilio Frustrations
Dec 24, 2014
I’ve been alternately happy and very unhappy with my service from Twilio, a well known company that provides easy SMS and voice capability to applications via its API. You can see a script I wrote to handle a similar but different issue from this post here.
When you send SMS to the service, it delivers it to your receiving application as a POST request (kind of webhook-ish). The POST request includes metadata about the message, the message itself, and, in the case of MMS, an URL where the image is publicly available on Twilio’s servers. This URL is randomized and decently secure, but nonetheless public.
Due to this method, media is necessarily referenced by relation to its parent message – media cannot be treated as a standalone instance; you actually have to use the parent message ID in referencing anything having to do with the media. Generally speaking, if you want to delete media, you must iterate through your messages, and then delete each media instance individually before deleting the message itself.
If you delete the message before the media, you’re out of luck. There’s no recourse; you have no way of accessing the media at all, and it remains publically accessible for perpetuity (I don’t know if closing your account with them will remove the images).
This is vexing in and of itself, but even worse is that you are only allotted 5GB of free storage space for media before you are charged for additional storage. Because of the aforementioned issues, if the message is deleted, those images apparently PERMANENTLY take up storage space. And worse still, there’s no way to know how much space you’re using. Near as I can tell (by the absence of information), they expect you to just traverse your media and add up what you’ve used – impossible if you can’t access the media at all!
Very frustrating. Twilio, please add some API features to fix this!