Developers November 26, 2020

How to build out messaging app with Twilio


Hello everyone,

I have an idea to build an app that randomly sends positive messages throughout the day. I have explored the twilio api and found out that a user has to pay for a phone number and I'm not too sure if there is a limit of requests that can be made through one application to the Twilio API.

I'll like for people to be able to sign up for this application to receive positive messages at random daily or weekly.

I'll appreciate any input on how I can go about building this idea out while taking into account the limitations of the Twilio API

  1. 1

    Hey Lyomann. This sounds like a great idea. I've done things like this before using Twilio. I believe you get a $15 credit that will last you a while. $1 a month for the phone number and then a very small amount for each message. If you write about it, I'm sure you could get some more credits from Twilio. You should also check out It abstracts away the Twilio API and allows you to add other channels like email, slack, mobile push and handle it all using a single api call. It also has list support built in. Happy to help with any questions. I also like for creating serverless apps.

    1. 1

      Thanks for the rich information you've provided me, I really appreciate it. I'll definitely take a look into and see how I can implement that platform into what I want to build out. Also, can you explain what you mean by list support built in? I checked out as well, I'm assuming this is a platform I can deploy my app to, however , I think I saw a Node runtime, I am building the app in Java, will I still be able to use with Java ? thanks again. I'll probably be reaching out to you sometime soon lol

      1. 1

        Yeah sure. So you'll probably want people to be able to subscribe to these messages. There's a Lists API to help with that. Then you can just send the message to a list and everyone subscribed will get it.
        Oh, Java. Yeah, probably isn't your best bet. It helps you build Lambda functions and they don't support Java. I'm not familiar with deploying Java applications. It's been a long time since I used Java. We did just have a community member create a Java Library for Courier, it could be helpful.

        Good Luck. You're welcome to reach out any time.

        1. 1

          Thanks much !this info you've provided are godsent. Do you have a specific medium I can reach you in the future ? i'm not sure if IH enables inboxing

          1. 1

            You're welcome. My email and twitter are in my profile. You're welcome to use either.

  2. 1

    Hey Lyomann, Ive made a couple apps that connect to twilio, so I might be able to help. Just to clarify, end users don’t pay for a phone number, you do. and it’s cheap, like $1 a year or something.

    Secondly, if you’re just sending messages, you won’t hit any API limits. You’re charged per text sent, so you could send 100,000 messages, just be prepared to pay for it.

    I have an open source app I can link to that connects to twilio to send messages everyday at a certain time to all my users. let me know if you’d like the see the code, and i can share a github link. (i’m on my phone right now otherwise i’d do it immediately.)

    What you could do is set up a cron job that runs every couple hours or so, and then generate a random number. If the number is greater than a certain threshold, you send the texts. Otherwise you don’t. that way it’s random :)

    1. 1

      Thanks for the input. I'd rather not pay or will like to pay as minimum as possible, since this is just a app for gratitude lol. Yes please, i'll like to see the code.

      1. 2

        Here is a link to the relevant function:

        You can see that Im initializing the client above it, which is just the twilio NodeJS SDK. Feel free to dig around the entire project to see how its all setup, and let me know if you have questions! Good luck, I like the sound of your project.

        Oh, and only a handful of people used this, so my Twilio fees were very small. You'll probably be fine, cost-wise, unless your project goes viral ;)

        1. 1

          Thanks for this info 🙏🏾

  3. 1

    I would compare the pricing plans of Twilio and other alternatives and see what fits best for you.

    But with mobile apps and PWA's you can send notifications to phones for free.

    1. 1

      Wok, thanks. I've heard of PWA's but never used it. I'll have to do my research on it.

      1. 1

        Unfortunately you can't send notifications using a PWA on iOS so they're a non-starter unless your audience is Android-only.

        1. 1

          Oh geez 😳😳. You saved me a ton of time for this info. I never new so . Thanks for letting me know before I begin the coding

Recommended Posts