A Step by Step Guide for an Echo SMS Service

Let's start with sending SMS

  1. Buy a SMS-enabled number.
  2. Set up a Messaging Profile. No need to do anything on the inbound side yet. We will do that later.

At this stage, you are ready to send SMS.

  1. Open up Postman. "POST" to "https://sms.telnyx.com/messages"
  2. In "Headers", set your "x-profile-secret" to the secret under your Messaging Profile.
  3. In the "Body", you can paste in the following:
{
"from": "+1[your messaging-enabled number]",
"to": "+1[intended recipient]",
"body": "Hello World"
}

Here is a video demo showing the POSTMAN setup & SMS action

You have sent your first SMS!


Now let's build an echo SMS receive server.

  1. You need a domain
  2. You need a host
  3. You need the domain name to resolve to the said host
  4. You need to configure your firewall such that outside traffic can access your host, please allow the subnet 192.76.120.192/27.
  5. In your particular messaging profile, under "Inbound", put in your URL: "http://my-host.my-domain.com"

The above steps will make sure Telnyx knows where to deliver your messages and the messages won't be dropped by your firewall. As a sanity check, ssh into your host and start a simple HTTP server that does nothing yet.

user@sms-demo:~$ sudo python -m SimpleHTTPServer 80
Serving HTTP on 0.0.0.0 port 80 ...

Send an SMS to your SMS-enabled number and you should see something similar to the following:

10.15.2.34 - - [27/Jul/2017 19:15:33] code 501, message Unsupported method ('POST')
10.15.2.34 - - [27/Jul/2017 19:15:33] "POST / HTTP/1.1" 501 -

Now, you actually need to write a server that handles the POST request that comes in from Telnyx. If you need help to set up your first server, please use this GitHub repository as a starting point.

Here is a demo video of receiving SMS by configuring a Web-hook to messaging profile.



Sending SMS through Alphanumeric ID

Alphanumeric Sender ID allows you to set your brand or company's name as the Sender ID when sending one-way SMS

In order to use Alpha Sender with your Messaging Service, Alphanumeric Sender ID must be enabled on your messaging profile under Basic option

Here is a demo video of sending SMS through Alphanumeric ID

Webinar

If you want a more in depth discussion on our messaging services, check out our webinar below.

Can't find what you're looking for? Click the chat bubble at your lower right hand corner and start a chat!

Did this answer your question?