# Dropilio - Leveraging Twilio Whatsapp API

### What I built

Dropilio is a REST API service for sending local files as attachments with Twilio Whatsapp API. This leverages the use of Twilio Whatsapp API for Desktop applications such as those built-in Electron, GTK, etc which intend to send notifications with file attachments.

If you are working on a Desktop application, and you want to send a Whatsapp message along with attachments using Twilio Whatsapp API, you must include a link to that attachment as a media resource. For this, your attachment must be somewhere on the Internet. Dropilio solves this problem by uploading your attachment to your Dropbox account and then gets a temporary link that can be used by the Twilio Whatsapp API.

This project belongs to the category of **Interesting Integrations** for [Twilio and Dev hackathon](https://www.twilio.com/blog/introducing-code-exchange-community-and-hackathon).

### Branding

I asked my little brother to come up with the branding for the app. I explained the functionality to him and he came up with this.

![Dropilio App branding by Ravgeet Dhillon](https://www.ravgeet.in/assets/images/blog/dropilio-branding.png)

### Project Usage

You can browse the [Dropilio project](https://www.ravgeet.in/projects/dropilio/) on my website for complete information regarding the project.

### Link to Code

You can always get the development code for the app at [https://github.com/ravgeetdhillon/dropilio](https://github.com/ravgeetdhillon/dropilio).

### How I built it

While interning as a Full Stack Developer at [Techies Infotech](https://techiesinfotech.co.in), I was granted a project to implement this sort of functionality in the native Desktop apps. So I decided to go with the Twilio API. While reading on [Dev](https://dev.to/godspowercuche/announcing-the-twilio-hackathon-on-dev-1d06-temp-slug-8558819), I came to me as a surprise that Twilio and DEV were organizing a hackathon and so, I decided to submit this project for the hackathon after taking approval from my employer.

I used Twilio SDK for PHP and PHP wrapper for Dropboxv2 API by Kunal Verma. I tested the service using Postman and made it live on Heroku.

The most important thing that I learned during the development of this project was security. I learned about how to set up a good authentication for a REST API service. I ended up developing a simple yet secure way to authenticate the requests sent to the API endpoint.

### Additional Resources

- PHP SDK for Dropbox v2 API. - [https://github.com/kunalvarma05/dropbox-php-sdk](https://github.com/kunalvarma05/dropbox-php-sdk)
- PHP SDK for Twilio API. - [https://www.twilio.com/docs/libraries/php](https://www.twilio.com/docs/libraries/php)

Thanks for reading 💜

***

If you enjoyed my blog, follow me for more informative content like this.

I publish a [monthly newsletter](https://www.ravsam.in/newsletter/) in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev related posts which I across while surfing on the web.

Connect with me through [Twitter](https://twitter.com/ravgeetdhillon) • [LinkedIn](https://linkedin.com/in/ravgeetdhillon) • [Github](https://github.com/ravgeetdhillon) or send me an [Email](mailto:ravgeetdhillon@gmail.com).

— [Ravgeet](https://www.ravgeet.in), *Full Stack Developer and Technical Content Writer*

