Company
Date Published
Author
Layla Porter
Word count
548
Language
English
Hacker News points
None

Summary

Sending media messages with Twilio's WhatsApp API is now possible and can be done just as quickly as sending text-based messages. To get started, set up a Twilio account, .NET Core 2.2 SDK, and WhatsApp Sandbox Channel. Create a new .NET Console application, add the Twilio NuGet package, and initialize the Twilio REST client with your Account SID and Auth Token. Send a message by calling the MessageResource.Create method, passing in the sender's and recipient's WhatsApp phone numbers, a text-based message body, and the media URL. The project can be restored from GitHub and built to run in no time, sending a media message to your phone. Note that there are differences between MMS and WhatsApp media messages, such as file type support and messaging sessions.