You can start a conversation by scanning this QR code with your phone too.Įmoji translation via WhatsApp is possible with only a few lines of code when you have the right tools to hand. If you want to try the app out without connecting to the sandbox, send your message to our WhatsApp number +441745472072. If you get a message back saying your number is not associated with the sandbox channel, make sure you follow the instructions to connect your number to the sandbox. □ □ WhatsApp □ your □, send a □ to the sandbox 2⃣ and you’ll receive a response with your □ translated to emoji. Open up WhatsApp on your phone, send a message to the sandbox number and you’ll receive a response with your message translated to emoji. Save the channel and prepare to test! □ Testing the app Open the WhatsApp sandbox, find the field for when a message comes in and paste in the Function URL. Copy the URL as we will need it to configure the WhatsApp channel. Save the Function and it will automatically deploy. Save the config and we’re ready to build the function.Īdd a new Function from the management page and choose the “Hello SMS” template, as responding to an incoming WhatsApp message uses the same TwiML as responding to an incoming SMS message. In the dependencies section add version 1.0.8 of moji-translate. In the Twilio console, head into the Runtime section to configure your Functions. To use moji-translate in a Twilio Function we need to install it. Powering both of them is the moji-translate module, which in turn uses the emojilib keyword library by Mu-An Chiou. Let’s get building! □ Building the appįirst up, let’s take a look at the what powers Monica’s apps. You will also need to connect your own WhatsApp account with the sandboxĪnd that’s all. Follow these instructions to install the WhatsApp Sandbox Channel in your account. A Twilio account ( sign up for a free Twilio account here).If you want to follow along with building the emoji translator you’ll need: For ease of deploying this, I’m going to build this as a Twilio Function. WhatsApp messages via Twilio result in webhooks, much the same as receiving an SMS message to a Twilio number, so if you’ve built a Twilio SMS application before this will be familiar. I decided to build this project using Node.js, following in the footsteps of Monica’s projects. You can try it out now by sending your message to our WhatsApp number +441745472072. Inspired by Monica Dinculescu’s to_emoji Twitter bot and emoji translator I decided to build a WhatsApp text-to-emoji translator. I □ emojis, so when I heard about the new Twilio API for WhatsApp I wanted to build something emojiriffic.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |