SIMPLE SMS API IN PHP

SMS API to forward SMS to an email address

DIDForSale SMS API lets you handle incoming SMS in your application. You can configure the SMS to forward to your URL. Once you set the SMS to your web URL, all the incoming messages will be forwarded to your web URL. From there your application can do further routing or take actions depending on your further requirements and configurations.

How to configure the SMS to forward to web URL?

  • Login your DIDForSale customer portal.
  • Click on Manage Products
    • SMS.
    • Select the DID number you want to forward to your web URL.
      Please note the DID number you choose should have SMS Enabled on it. 
    • Choose DID action to “Update SMS Forwarding” 
    • Click on Apply

Below are the screenshots from DIDForSale customer portal to manage SMS Service.

sms-api-configuration

Figure1. Manage SMS service on a phone number.

Once you Choose the DID number that you want to update SMS forwarding on and click Apply you will then be taken to Manage SMS Forwarding. Please See Figure 2. Manage SMS Forwarding.
On this screen you will update the URL. You can choose from one of the three available options.

  • Forward SMS to phone number
  • Forward SMS to email
  • Select HTTP URL for SMS Forwarding to your API.
  • Select the 3rd option Select HTTP URL for SMS Forwarding to your API.
    Here you will type in the SMS API URL where you want to forward the SMS.

Screenshot of Manage SMS Forwarding screen from customer portal

sms-api-forward-to-url

Figure 2. Manage SMS Forwarding

All the future incoming SMS will be forwarded to this new SMS API URL you just configured. You might be using incoming SMS for update/order from customer or may be using SMS for Authentication purpose.

SMS API example!

Here in this simple SMS API example, we will forward the SMS to email address.
When we send the request to your SMS API URL we send following parameters in JSON FORMAT:-

  • “From”,
  • “To”
  • “Text”

Syntax:

{“text”:”This is a text message to sms api”,”from”:”19499300360″,”to”:[“19495354600”]}

Here is PHP Code snippet.

This is just a simple example to demonstrate how the system works. Based on your needs you can build a system that meets your unique and comprehensive requirements. You can do anything you want with it. You can easily build a complicated SMS or Voice Application using our Developer Kit

New Posts

DIDforSale Obtains Microsoft Skype for Business Certification

DIDforSale Obtains Microsoft Skype for Business Certification TUSTIN, Calif., May 29, 2019 /PRNewswire/ -- DIDforSale, a leading provider of business communication solutions in the US, announced today its Skype for Business certification as a SIP trunk provider....

read more
SMS Compliance Guide

SMS Compliance Guide

Guide to SMS Compliance.     SMS marketing is one of the most effective types of marketing around. An SMS message has an open rate of 98%, when compared to 20% with an email. But before you start sending SMS text campaigns, you need to make sure that you’re compliant...

read more

Buy Tollfree Number

How to Buy a Tollfree Number?     Do you want to buy a tollfree number? You may have heard that a vanity toll free number could help with boosting your business. From 2015 to 2018, the number of toll free numbers for small business has increased by around 10,000 in...

read more

SIP Trunk Cost Comparison

SIP Trunk Cost Comparison SIP trunking is an extremely popular option for any business communication system. Session Initiation Protocol, as it’s formally known, offers a way to setup communication sessions in real-time over an IP network. Basically, SIP trunking...

read more

How to choose SIP Trunk Provider

Do's and Dont's of Choosing the right SIP Trunk Provider !  SIP trunking is one of the best alternatives to the traditional telephone systems we’ve all grown up with. In a nutshell, it’s a system that allows you to make affordable calls across the world using your...

read more

SMS via Email – Receiving, Replying & Sending

SMS VIA EMAIL – RECEIVING, REPLYING & SENDING DIDForSale’s new feature will enable its user to receive, reply & send SMS via email. This will give individuals and resellers the capability to allow anyone to receive, reply & send SMS by using an email address. Easy...

read more

Learn more about our Products

SIP TRUNKING

PHONE NUMBERS

Visit SIP Trunking Pricing to see which plan suits your business!

With so many options to pick from it can often be hard to decide what’s best.
Our plans have been packaged together to give you optimum output.

Our SIP Trunks are Compatible with wide range of PBX & Platforms.

 
Share This