Documentation for Developer/Administrators
HomeAccount PortalPricing
  • About this Documentation
  • Overview
    • Table of Content
    • Introduction
    • Welcome Kit
      • Add Balance
      • Buy New Phone Number
      • Voice configuration
      • SMS Configuration
        • SMS Forwarding
      • Reporting
        • CDR
        • SMS
        • FAX
  • DIDforSale Portal
    • Register a new account
    • Dashboard
    • Reporting
      • CDR
      • SMS
      • Inbound Calls
      • FAX
      • Group Usage
      • Voicemails
    • Phone Numbers
      • Phone Numbers
      • Channels
      • E911
      • Porting
      • Send FAX
      • FAX Emails
      • SMS Groups
      • Groups
      • CNAM
    • Interconnection
      • Manage IP
      • SIP Accounts
      • Testing Center
      • Phones and Devices
      • Custom Dialplan
      • Audio Files
    • Tools/Settings
      • Outbound Rates
      • API Control
      • Fraud Control
      • Postcalls
    • Account
      • Profile
      • Change Password
      • Add Balance
      • Payment History
      • Voucher
      • Invoices
      • Auto Refill
      • Charges
      • Contact Us
      • Global Settings
      • Logout
  • SIP Trunking
    • Configuration of Phone Numbers
      • Configuring SIP to IP Account
      • Configuring Custom Dial Plan to a Phone Number
      • Configure SIP to SIP Account
      • Set up Call Forwarding to a Phone Number
      • http URL Forwarding Setup
      • Webhook Setup
      • FAX
        • Receive FAX
        • Fax through SIP Account
        • Send FAX
    • Adding IP Address
    • Creating SIP Account
      • VoiceMails
    • SIP Trunk Interconnection Guide
      • 3CX
        • SIP-based Configuration
        • IP-based Configuration
      • Allworx
      • Asterisk
      • CISCO UCM
      • FreePBX
        • FreePBX PJSIP Configuration
          • IP-based
          • SIP-based
        • FreePBX ChanSIP Configuration
          • IP based
          • SIP based
      • FreeSwitch
      • FusionPBX
      • GoAutoDial
      • Grandstream Devices
        • GrandStream 6102 IPPBX
        • GrandStream 502
        • Grandstream 6104 IPPBX
      • HoduSoft PBX System
      • Microsoft Skype for Business
      • NEC Corporation
      • PBXinaFlash
      • Polycom OBi300
      • ShoreTel PBX
      • Vital PBX
      • Yealink Phones
      • ZYCOO
    • DIDForSale Softphone
    • Zoiper Softphone Application
      • Iphone App
    • Grandstream Wave Mobile Application
    • Enable Call Recording
    • Call Transcription
  • Voice and SMS APIs
    • Getting the API key and Token
    • Voice
      • Big Picture
      • Quick Start
        • Identify Caller
        • Collect Response
      • didML Reference Doc
        • Voice API Request Params
        • Voice API Response
      • didML Verbs
        • <dial>
          • <client>
          • <conference>
          • <number>
          • <queue>
          • <sip>
        • <enqueue>
        • <fax>
        • <gather>
        • <hangup>
        • <pause>
        • <play>
        • <postcall>
        • <record>
        • <recordcall>
        • <redirect>
        • <reject>
        • <say>
        • <sms>
    • SMS
      • Configure SMS
      • Send/Receive SMS via Email
      • SMS Forwarding
        • SMS forwarding to Phone Number
        • SMS forwarding to Email
        • SMS forwarding to a Webhook
      • SMS/MMS Desktop Application
      • SMS APIs
        • Activate SMS
        • Deactivate SMS API
        • Send SMS
        • SMS CDR
        • Set SMS Forwarding
      • Bulk SMS Feature
        • Creating SMS Campaign
        • Custom or Dynamic Text Sms
  • UC Editor
    • UC Editor
      • Features
      • How to configure/setup the Custom Call Flow
  • FAX via Email
    • Send & Receive FAX via Email
Powered by GitBook
On this page
  • Configure SMS to Web URL:
  • What information we send to your web-hook for all incoming messages.
  • Troubleshooting incoming SMS.

Was this helpful?

  1. Voice and SMS APIs
  2. SMS
  3. SMS Forwarding

SMS forwarding to a Webhook

PreviousSMS forwarding to EmailNextSMS/MMS Desktop Application

Last updated 6 years ago

Was this helpful?

Configure SMS to Web URL:

You can setup a web-hook to receive SMS to your web application. If configured to web-hook, all the messages will be forwarded to your web URL.

Select the phone number to configure SMS

In the POP Window, Check URL and type in the URL to handle SMS.

Click on Confirm to save the settings.

Here you can see, SMS if configured to web-hook. Now you can create your application to process all the incoming messages.

What information we send to your web-hook for all incoming messages.

We send the data in JSON format. For all incoming messages you will receive "From" "To" "Text" and "ReferenceID" and "deliveryReceipt", Here is sample data.

{"text":"Test","from":"1949XXX1234","to":["1949XXX4400"],"referenceid":"5f343f8-2e56-4458-b01a-e123551107e8","deliveryReceipt":false}

SampleCode to handle SMS in the configured in the about example. In this example, web application simple receive an SMS and forward to an email address.

//https://www.didforsale.com/apidemo/handlesms.php
      <?php
       $response = json_decode(file_get_contents('php://input'), r);
       $subject="You Received a SMS";
       $Message="Here is your message\n";
       $Message.="From =". $response['from']."\n";
       $Message.="To =". $response['to'][0]."\n";
       $Message.="Message =". $response['text']."\n";
       echo $Message ;
       // Type in valid email address ex: username@example.com
       mail("hidemail@domainname","$subject",$Message)
?>

Troubleshooting incoming SMS.

We get the SMS and forward to your web url. While doing the we store the response code we get from your application. To view that. Click on Reporting -> SMS.

You can view all incoming and outgoing messages here.

SMS CDR

Enter a caption for this image (optional)

Click on "received" to view the details.

SMS CDR Details

Enter a caption for this image (optional)

Here you can see all the details of the communication between your system and our system.

  • Destination: Where the messages was forwarded to.

  • Data: What information we sent to the web url.

  • Server Response: Response we received from your server.

    • PS: All we need is 200 OK. All the other information is stored and discarded, we don't do anything with the response data.

We would love to see what you build and will be happy to help you troubleshoot any issue. Contact us for any issue.

support
Configure SMS
Configure SMS to Web URL
SMS Configured to Web URL