Вы находитесь на странице: 1из 7

NIC SMS Gateway Integration Guide

Contents
Step 1: Registration for SMS Service ........................................................................ 3
Step 2: Pre-requisite for integration and checking ...................................................... 3
Step 3: Testing ..................................................................................................... 5
Step 4: Sample code for integration over HTTPS........................................................6
Step 1: Registration for SMS Service

1. Online form on https://msgapp.emailgov.in/OnlineForms/SMS_Service_Registration.jsp


2. The scanned copy of the duly signed and sealed form must be sent to
smssupport@gov.in for further processing.
3. For any issue related to SMS form filling, SMS Support is to be contacted on
smssupport@gov.in or register complain on http://servicedesk.nic.in (toll free
number 1800111555).
4. For further clarification regarding filling up the online form, refer
https://msgapp.nic.in/OnlineForms/images/OnlineFormsGuidelines.pdf.
5. To know the NIC Coordinators for your ministry and department, Refer
https://msgapp.nic.in/OnlineForms/nic_coordinators.jsp.

Step 2: Pre-requisite for integration and checking

1. ALL TESTING MUST BE DONE FROM SERVER FROM WHICH SMS GATEWAY NEEDS
TO BE INTEGRATED.
2. Check the domain look up using nslookup command. If domain
(smsgw.sms.gov.in) does not get resolved, then please contact your
server/firewall administrator. Refer below screenshot for using nslookup command.

3. Telnet smsgw.sms.gov.in (164.100.14.211) on port 443. Go to command line


interface (CLI) and type telnet smsgw.sms.gov.in 443 and press enter. If telnet
works then connection to SMS gateway is OK.
4. If telnet does not work, then there is connection issue. Refer below screenshot.

5. One possible reason for telnet failure is that your application server is behind a
firewall and firewall rule is not configured to allow traffic from your server to SMS
Gateway.
6. In this regard you have to apply for firewall rule through https://farps.nic.in as per
below screenshot.

7. Firewall request has to be filled by respective NIC coordinator for SMS access
through URL https://farps.nic.in/ as described below in Sample Firewall request.

*If both private IP and public IP are configured on your application server, then before
filling up the following firewall form, please confirm from your network/firewall
administrator that the SMS request from your application will reach SMS server from
which IP (PUBLIC or PRIVATE).
Are you the Server/ Website/
NO
Application Owner ?

Data Centre where server hosted NIC HQ DATA CENTER

Functionality of the Server SMS Server

OS of the Server LINUX

IP Type Public Only

Public IP 164.100.14.211 Private IP

URL of the application hosted on


above IP (if any)

Public IP rule for access from Outside Systems to SMS Gateway Server

URL of the
Reason for
From To Services server to be Ports Protocol
opening port
visited
YOUR
APPLICATION 164.100.14.211 HTTPS 443 SMS Service TCP
SERVER IP

For any issue related to firewall, NIC Cyber Security team should be contact on 011-
24305140 (Email on : appsecmon2@nic.in, appsecdev3@nic.in , aniljha@nic.in).

Step 3: Testing

1. Once again test connectivity using nslookp and telnet command as explained
above.
2. Secondly test SMS delivery by calling SMS API (https://
smsgw.sms.gov.in/failsafe/HttpLink?ussername=[USERNAME]&pin=[PASSWORD]&messa
ge=[MESSAGE]&mnumber=[MOBILE NUMBER]&signature=[SENDER ID]) from the same
server/machine for which you have the firewall permission. All testing must be
done from the same eco-system for which you have got the firewall rule enabled.
If this is not done you may get different result and SMS team will not be
responsible for the same. If it is windows environment, then launch the internet
browser and copy the SMS API on the browser as mentioned above. For Linux
based system use wget or elinks command.

Use Browser (for Windows)

Use wget and elinks command as shown below (for Linux based system).

3. If error reported as shown in below image, then contact SMS Support team on
smsssupport@gov.in.

4. If SMS delivery is successful, then test SMS from your application. If from
application SMS is not getting delivered or you are facing any issues then check
and debug your application.

Step 4: Sample code for integration over HTTPS

1. The sample code in java, .net and PHP is available at


https://msgapp.nic.in/OnlineForms/Documents.jsp. These sample codes are for your
guidance only. You must review the code and if required you can modify as per
your site. This link also provides documents for integration, guidelines for SMS
refer https://msgapp.nic.in/OnlineForms/Documents.jsp.
2. If required, you can also download the public SSL Certificate from
https://msgapp.nic.in/OnlineForms/Documents.jsp.
3. Integrate the modified sample code in the application and use SMS gateway for
SMS delivery from application.

Вам также может понравиться