New Feature Release: SMS API

//New Feature Release: SMS API

Hello everyone, I’m very excited today to tell you about a brand new feature that will unlock a huge number of new possibilities when it comes to SMS text messaging in smrtPhone.

We are happy to announce our new SMS API which you can access with your API Token that is available on the Dashboard to all smrtPhone Administrators. To interact with the API, you can send a POST to the below URL. Your API token must be in the header of the request.

https://phone.smrt.studio/sms/send/(parameters)

The three parameters necessary are the smrtPhone number that’s sending the text (from=), the recipient phone number (to=), and the message itself (message=).

Please be advised that there is a limit of 200 text messages per day, per number. That being said, as we release this, we are hard at work on our new Bulk Sending API, which we hope to release next week.

Now that we’ve addressed the API itself, let me show you a couple of ways you can start using it right away using Globiflow. I am going to describe two solutions: 1) A solution using fields that are in-app, and 2) A solution involving comments.

Solution 1: In-App

In order to achieve this, I added some fields to my Contacts app in Podio.

These fields hold my phone numbers in smrtPhone, the text message that I want to send, and a button to set off my flow. Take note of the header in the POST action, ensure your API token is put in. The variable “mobile” will parse out the mobile number from the Phone field.

So when I click Send Text, the API is called and the fields empty for the next use. You can also see the calculation field I have devised to hold the SMS History. I will show you these calculation fields in another post.

Here’s some variables you can copy and paste:

mobile :: preg_match_gf("/mobile:([^,]+)/", [Phone Number], 1)

API Header :: X-Auth-smrtPhone:API KEY

API URL :: https://phone.smrt.studio/sms/send

POST Parameters :: from=[From Number]&to=[mobile]&message=[Text Message]

Solution 2: Comments

Another possible way of interacting with the API is by comment trigger. This may be more useful if you want to have the ability to text from any app in the system (where a flow is in place to handle the request) via the comments.

For this demonstration, we are still within the Contacts app itself. However, if you wanted this to fire in another app, you simply need to get the referenced contact, or search for the contact in question, to get their mobile number. You do not need to store the From: number in a field as we are in this example, you can simply add the number to your flow when you set the parameters, and possibly have multiple flows to handle different numbers.

We use the code sms: followed by the text message in question to fire the API call. The triggering comment will get deleted and replaced by a much more nicely formatted track.

And again, if you’d like to copy and paste:

message :: str_replace("sms:", "", [Triggering Comment])

Because all of the inbound and outbound SMS messages are stored in your Communications app, you can use calculation fields to spread out whatever tracking you need across multiple apps, or, using the comments solution, leave tracks behind that make sense to your workflow. The possibilities are truly endless and now, along with the smrtPhone Chrome Extension, you can access your entire communications system without ever leaving Podio.

If you devise your own effective strategies for our SMS API, please feel free to share them with the community in our smrtPhone Users workspace on Podio. Happy tinkering!

 

By | 2018-02-06T12:26:03+00:00 November 10th, 2017|smrtPhone Features|Comments Off on New Feature Release: SMS API