Here, we explain the process of API configuration w.r.t URL and Parameter for sending SMS through Saral.
In the Service Provider window, the configuration will be done by providing
- URL: Login Link for the Service Providers Site (Will be available with API).
- Parameters: Actual API to Configure.
Note: URL and Parameters can be obtained from API details provided by the Service Provider or user can browse the website of service provider for API documentation.
Understanding the API for URL & Parameter
URL = http://login.shortmsgservice.com/api/sendhttp.php?
- Highlighted fields are standard fields which should not be modified; we can assign values to these fields by drag and drop of the fields from the list given under parameter tags.
- Replace only the required fields with Parameter Tags without disturbing the standard fields and edit the other fields only if the API demands, like the Country code as shown below.
How to create a Valid API
- Open a Notepad
- Copy paste the API URL and modify it with the actual parameters (transaction values). Now, paste the URL in any browser. (Example shown below)
- Browser will return code if success or an error message
- Upon Success, same can modified with Parameter Tags to use in Saral.
Replace the actual values with parameter tags as below:
http://login.shortmsgservice.com/api/sendhttp.php?authkey=<PassWord>&mobiles= <MobileNumber>&message= <Message>&sender= <SenderID>&route=4&country=91
FAQs on Configuration
1. I have configured SMS and assigned template, but not getting SMS sent on saving transaction. What is the solution?
A. Check for the Login Id, Password and Sender ID provided on creating a service provider, is correct.
2. All settings are done and can get SMS sent report, but SMS is not received at selected mobile number.
A. Check whether all the settings done are correct. If the problem still exists, login to Service Provider’s Site;
- Look for Send SMS option. Send a test SMS and confirm whether the message is received. If the SMS is not received, contact the service provider.
- If SMS is received, then check for Delivery Report status. If the SMS sent from application is shown in the delivery report, then contact the service provider.
3. API in the browser is returning an error code. How to Rectify?
A. Check for the Error Code in API Documentation. Check whether the URL configured is correct. All the values given in the URL is in accordance with the API.
4. Send authorization is not asked while sending SMS on saving transaction. Where to enable the Setting?
A. Enable Authorization to Send SMS Option in Enable SMS Screen.
5. Customer Name or certain fields are missing in the message received.
A. Check the message template for the missing fields. Confirm if the fields are given in the template and also values are provided for the fields in the corresponding transaction.