This article demonstrates how to establish a connection of WhatsApp by Twilio with Quickwork.
What you'll need:
Skill level: Easy
Time required: 3 minutes
- Twilio account
- WhatsApp messaging skills to initiate the Sandbox environment
How to establish a connection with WhatsApp by Twilio
You can click the following preview to watch a video of this article or continue with the guided walk-through:
- Sign in to your Twilio account.
- If your account is secured with 2-Factor authorization, you'll be asked to either enter the OTP sent on your registered phone number or re-enter the account password to securely log in.
Note: In my case, a verification code was requested to log in securely.
- After successful login, click on Account in the header menu on the top right corner. Now, click on General settings option from the drop-down menu. Scroll down look for the Live Credentials section.
- Under the Live Credentials dialog box, copy the Account SID and Auth Token:
- Now go to Quickwork and choose the WhatsApp by Twilio app from the App drop-down field under Trigger or Steps section.
- Select the trigger or action accordingly.
- To establish a connection, click on Link an account and enter the copied Account SID and Auth Token:
- Click the Link account button. Your connection will be created.
- Enter the name of the event in the Event field, say text message. This will generate a static callback URL of your Twilio account. We need to add this URL to our Twilio account in order to listen to incoming messages on WhatsApp.
- To do so, copy the callback URL. Then go to your Twilio account, click the horizontal ellipsis, and select the Programmable Messaging option:
- Then navigate to Settings | WhatsApp Sandbox Settings and paste the callback URL in the WHEN A MESSAGE COMES IN text field. Scroll down the window and click the Save button:
- Here, we have successfully configured the callback URL in our Twilio account.
Now, we need to start the WhatsApp by Twilio sandbox environment to send and receive the messages on WhatsApp. Follow these steps:
- Move to Try it Out > Try WhatsApp option of the Programmable Messaging dashboard:
- This window helps you understand how to initiate a Twilio sandbox environment on WhatsApp.
- Save the WhatsApp number, as highlighted, on your Android/iOS devices and send the code as a message. The code obtained here is
Note: The WhatsApp number i.e., +14155238886 remains the same however the code is unique for each Twilio user.
- As soon as you send the code on the above-mentioned number, you'll get a confirmation message for the initiated sandbox environment:
stopto terminate the sandbox environment.
Note: To know more about WhatsApp configuration for Twilio, click here.