Академический Документы
Профессиональный Документы
Культура Документы
Overview
This document is intended for customers of Dove Soft Pvt Ltd. product only. You can send single/multiple SMS using HTTP API format and XML API
format.
1. HTTP API
This HTTP API supports the below things.
URL:
You will call the below URL using POST or GET method.
For DOVE SMS:
http://mainadmin.dove-sms.com/sendsms.jsp
For Reseller:
http://resellern.dove-sms.com/reseller/sendsms.jsp
Please find the below parameters for above URL request:
Compulsory Parameter Description
Parameter
user
Description
User id of the DOVE SMS account
password
mobiles
comma separated mobile numbers on which message will be deliver(e.g. 9824012345,98XXXXXXXX) .Either of
mobiles or group name you can use. At a time you can use only one parameter either mobiles or groupname
sms
SMS text which you want to send to your customer (e.g. Test message)
Description
clientsmsid
This is unique number. If you pass for single number in request you will get the same number in response. If you do not
pass you will get random number in response. Maximum characters length for this parameter is 20. For multiple mobile
number comma separated or group name you will get the same number in response.
groupname
Comma separated group name which you have created in application. If you want to send SMS to particular group
contacts then specify group name which you have made in application
senderid
sender id. If you pass sender id as a blank so it will take default sender id which will assign in your account.
scheduletime
If you want to schedule the SMS, specify date & time in yyyy-mm-dd hh:mm:ss format
unicode
If you want to send Unicode SMS then pass value 1. If you do not provide it will take 0 mean non-Unicode.
isallowduplicatemobile if you want to allow duplicate mobile pass value as yes . If you do not provide it will not allow duplicate mobiles.
Note: Do not pass clientsmsid if you pass this parameter as yes. If you pass clientsmsid along with this
parameter then for multiple mobile number it will consider as duplicate entry and it will not allow duplicate
mobile number even you have passed value as yes.
ndncchecking
<smsclientid>32455423</smsclientid>
<messageid>234XXXXXXXXXX</messageid>
<mobile-no>+30XXXXXXXX</mobile-no>
</sms>
</smslist>
In above response:
smsclientid: In response you will get smsclientid value as random number.
2. XML API
You will call the below URL using POST method.
For DOVE SMS:
http://mainadmin.dove-sms.com/sendsms.jsp
For Reseller:
http://resellern.dove-sms.com/reseller/sendsms.jsp
For bulk SMS sending, make the XML file or string in the below format and post to above URL.
<?xml version='1.0'?>
<smslist>
<sms>
<user>userid</user>
<password>password</password>
<message>message content</message>
<mobiles>9819000000</mobiles>
<senderid>Dovesf</senderid>
<cdmasenderid>910000000000</cdmasenderid>
<clientsmsid>123</clientsmsid>
<accountusagetypeid>1</accountusagetypeid>
<unicode>1</unicode>
<isallowduplicatemobile>yes</isallowduplicatemobile>
<ndncchecking>0</ndncchecking>
</sms>
<sms>
<user>userid</user>
<password>password</password>
<message>message content</message>
<mobiles>9924924701</mobiles>
<senderid>Dovesf</senderid>
<cdmasenderid>910000000000</cdmasenderid>
<clientsmsid>124</clientsmsid>
<accountusagetypeid>1</accountusagetypeid>
<unicode>1</unicode>
<isallowduplicatemobile>yes</isallowduplicatemobile>
</sms>
</smslist>
Compulsory Parameter Description
Parameter
Description
user
password
mobiles
comma separated mobile numbers on which message will be deliver(e.g. 9824012345,98XXXXXXXX) .Either of
mobiles or group name you can use.
message
SMS text which you want to send to your customer (e.g. Test message)
Description
senderid
sender id. If you do not pass sender id or pass as a blank, it will take default sender id which will assign in your account.
cdmasenderid
clientsmsid
This is unique number. If you pass for single number in request you will get the same number in response. If you do not
pass you will get random number in response. Maximum characters length for this parameter is 20. For multiple mobile
number comma separated or group name you will get the same number in response.
accountusagetypeid
If your account type is service (transactional) SMS then pass 1 and if your account type is promotional then pass 0
unicode
If you want to send Unicode SMS then pass value 1. If you do not provide it will take 0 mean non-Unicode.
isallowduplicatemobile if you want to allow duplicate mobile pass value as yes . If you do not provide it will not allow duplicate mobiles.
Note: Do not pass clientsmsid if you pass this parameter as yes. If you pass clientsmsid along with this
parameter then for multiple mobile number it will consider as duplicate entry and it will not allow duplicate
mobile number even you have passed value as yes.
ndncchecking
</error>
<smslist>
Error Code:
Error Code
Description
-10002
-10017
-10019
Inactive User
-10018
-10016
-10015
-10003
-10005
Invalid Senderid
-10011
-10004
Unknown exception.
-10006
-10007
Invalid Group
-10021
-10022
Password Require
-10026
-10028
-10027
Your DOVE SMS version has been expired. Please contact on DOVE SMS-support@Dovesf.com for
more details
Sample Code:
1. PHP
<?php
$xml_data ='<?xml version="1.0"?><smslist><sms><user>username</user><password>112131</password><message>message
content</message><mobiles>9898000000</mobiles><senderid>Sherif</senderid><cdmasenderid>00201009546310</cdmasenderid><accountusaget
ypeid>1</accountusagetypeid></sms></smslist>';
$URL = "http://mainadmin.dove-sms.com/sendsms.jsp?";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/xml'));
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
print_r($output);
?>
2. Java
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
import org.apache.commons.httpclient.methods.PostMethod;
public class testXML {
return in;
}
}
3. d