Twilio Integration

Home > Twilio Integration

If you want to power-up Datrm.in to use as a peer-to-peer (P2P) texting tool, then Twilio enables you to do just that. Twilio is a popular telephony service that apps like Datrm.in use to send text messages. Once the integration is added, you can send individual text messages to Lists directly from the app.

Twilio also provides the capability to make voice calls, but we have not integrated that into Datrm.in. Yet.

The integration requires three general steps:

  1. Signup for a Twilio account
  2. Enable the Twilio integration in Datrm.in
  3. Setup Twilio billing
  4. Register your number for a 10DLC campaign (optional)

Getting Started

The first step is getting setup with Twilio directly.

  1. Go to https://www.twilio.com/ and click “Sign up”
  2. Complete the quick form, accept the Terms of Service, and click “Start your free trial”
  3. Verify your email address
  4. Verify your phone number
  5. On the next screen it asks a few questions:
    1. Which Twilio product are you here to use? (Answer: SMS)
    2. What do you plan to build with Twilio? (Answer: Customer Loyalty)
    3. How do you want to build with Twilio? (Answer: With no code at all)
    4. What is your goal today? (Answer: 3rd party integrations)
  6. At this point you should be logged in to your Console, which is great, but we’re not done yet.
  7. In the left sidebar, click on Phone Numbers > Manage > Active numbers
  8. In the top right, click on “Buy a number”
  9. You should now see a web page with a table of phone numbers and search options. Here you can select a number that works for you. Most organizations search by area code, but you can also look for clever catch phrases as well (e.g. “win22”). Just don’t go too far down the rabbit hole. Clock is ticking!
  10. Click to buy the number you want, and confirm in the pop-up.
  11. Once the purchase is confirmed, click “Configure this number”
  12. On the following screen, give your phone number a friendly name like “Datrmin” or “Campaign”
  13. Add your physical address in the section “Add Emergency Address”
  14. Finally, keep this tab open, as we’ll need to come back to this page to wrap up the integration setup.

Enable Twilio Integration

  1. It’s all downhill from here! Open a new tab and head over to Datrm.in. Assuming you are an admin on your account, click on your email address in the top right of your screen and click Account Settings.
  2. Once you’re in Account Settings, click on the Integrations tab.
  3. Scroll down the list to Twilio and click Add integration.
  4. You should see a pop-up appear with a field for “Account SID” and “Auth token”. We’ll get to those in just a second.
  5. But first, copy the Webhook URL value (starts with “https://app.datrm.in/api/v1/webhooks”)
  6. Go back to the Twilio page where you configure the phone number.
  7. In the section under “Messaging” look for the field labeled “A message comes in”.
  8. Replace “https://demo.twilio.com/welcome/sms/reply” with your Webhook URL from Datrm.in. Click Save.
  9. Still in Twilio, go back to your Console home page
  10. You should see a section of “Account Info”. Copy and paste your Account SID and Auth Token into their respective fields in the Datrm.in integration settings. As Twilio warns you, NEVER share or store these values anywhere other than the Datrm.in integration settings box. If a hacker were to get a hold of them, they would have full control of your account and could run up thousands of dollars in charges.
  11. Once you paste your Account SID and Auth Token into Datrm.in and click Save changes, if the keys are valid, you should now see two new fields:
    1. Select a refresh schedule: This setting is not used for Twilio. Just make sure it is set to “Manually”.
    2. Select a Phone Number: Click the refresh button () and we’ll grab the list of phone numbers in your Twilio account.
  12. Click Save Changes again and if you see a green alert saying “That was easy! Credentials updated” then you are, indeed, all done.
  13. Click Close to finish it off.

Upgrade Twilio Account

If you are going to do any significant amount of text messaging, you will need to provide Twilio with a credit card.

  1. In the Twilio Console, in the top right, click on Billing, then Upgrade
  2. Enter your physical address
  3. The next section regarding “Tax Information” depends on your organization. We would suggest selecting “No, I am not exempt from sales or telecom tax” unless your accountant has advised you that you are exempt from sales or telecom taxes.
  4. Under “Fund your account” select an initial amount between $20 and $2,000. If you plan on regular text messaging, check the box to enable auto recharge.
  5. For Payment Method, enter your credit card. Be sure to save the card for future payments if you want your text messaging campaigns to continue un-interrupted.

Whew! We made it. It’s a few different steps and some back-and-forth, but you are now setup to send peer-to-peer (P2P) text messages directly from Datrm.in via any device.

The next step is to setup Call Lists, and you can find instructions on how to do that here.

Register for US A2P 10DLC

Using text messaging to contact customers, supporters, and other key audiences became popular because not many people were doing it. Then, of course, it became popular, and now lots of brands, campaigns, and spammers send text messages. This increase in quantity and degradation in quality of text messaging led mobile carriers to implement new regulations that impact deliverability of text message campaigns.

For small, infrequent text message campaigns, there’s very little to no concern for registering for this new regulatory construct known as A2P 10DLC (a fancy IT acronym for “application-to-person” messaging using 10-digit phone numbers).

Since the process to register for A2P 10DLC is constantly changing and depends on the frequency of text messaging, we are providing the following resources on Twilio’s website. As the system becomes more solidified, we’ll add direct steps to this document.

What about short codes?

Again, the explosion of text messaging has led to changes on how short codes can be used. Originally, a messaging service could purchase a single short code (a long, cumbersome, and expensive process) then share it among multiple users. For example, Twitter originally had a short code that any user could use to get followers. Now, short codes are limited to use by a single brand. The process of acquiring a short code is so expensive and time consuming that we do not recommend it except for very large organizations sending hundreds of thousands of text messages. If that does describe you, then you probably shouldn’t be using Datrm.in in the first place. We’re not a blast tool, we’re a relationship tool.