API Documentation (WWW - Dutasms.com)
API Documentation (WWW - Dutasms.com)
2
Integrate your business through SMS solution
Contents
I. Send SMS .......................................................................................................................................... 2
I.1. Send an SMS ....................................................................................................................................... 2
I.2. Simple Way to Send an SMS .............................................................................................................. 2
I.3. Send SMS by Group ............................................................................................................................ 2
II. PHONE BOOK ................................................................................................................................... 4
II.1. Add Phone Book ................................................................................................................................ 4
II.2. Edit Phone Book ............................................................................................................................. .. 4
II.3. Delete Phone Book............................................................................................................................ 5
II.4. Get Contact List ................................................................................................................................. 5
II.5. Get Contact List by Group ................................................................................................................. 5
II.6. Get Complete Data ............................................................................................................................ 6
II.6. Find Name ......................................................................................................................................... 6
II.7. Find Phone Number .......................................................................................................................... 6
III. Group............................................................................................................................................. 7
III.1. Add Group ........................................................................................................................................ 7
III.2. Edit Group ........................................................................................................................................ 7
III.3. Delete Group .................................................................................................................................... 7
III.4. Get List of Group ................................................................................................ .............................. 8
III.5. Find Group........................................................................................................................................ 8
IV. User Account .................................................................................................................................. 9
IV.1. Checking Customer Account Balance .............................................................................................. 9
IV.1. Change Password .............................................................................................................................. 9
V. Report ........................................................................................................................................... 10
V.1. Query Status .................................................................................................................................... 10
V.2. Delivery Report ............................................................................................................................... 10
VI. Return Code ................................................................................................................................. 11
VI. Example with PHP ........................................................................................................................ 12
Purpose : To send sms by sending encrypted passwords and Client trxID to avoid duplicate sms Syntax:
http://<server_name>:8080/web2sms/api/sendSMS.aspx?username=xxx&mobile=xxx&message=xx
x&auth=xxxx&trxid=xxxx&type=x
Example:
http://<server_name>:8080/web2sms/api/sendSMS.aspx?username=sms&mobile=08126531971&me
ssage=Hallo+world&auth=cd377b32c5745f89a53f6970d2f49969&trxid=sms0000000001&type=0
Parameter Description
Username Username provided to user to connect to our service
Mobile Destination mobile number , Indonesian (08xxxxx) or international (628xxxx) format.
Message Text Message (encoded, max 5000 chars)
Auth Authentication with formula :
MD5(username+password+Mobile)
trxID Client TrxID, used to avoid duplicate sms (Optional, max 50 char, type string)
type 0 (or missing) ascii text message (normal message)
3 Unicode message (Arabic, Japan, Chinese, etc)
Note :
1. For the account type of numeric sender id (sms standard), unicode supported by all operators.
Alpha sender account, unicode is not supported by Telkomsel and XL.
2. When the type of message is Unicode (3), then the message must be in hexadecimal format.
For Example :
Hexadecimal : 30533093306B3061306F4E16754C
Example:
http://<server_name>:8080/web2sms/api/sendSMS.aspx?username=sms&mobile=08126531971&me
ssage=Hallo+World&password=123456
Parameter Description
Username Username provided to user to connect to our service
Mobile Destination mobile number
Message Text Message (encoded, max 5000 chars)
Password Your Login Password
Example:
http://<server_name>:8080/web2sms/api/SendSMSGroup.Aspx?group=Marketing&msg=Hello+wor
ld&username=sman1&auth=ffb09fcbd7b381d0ff6ae1609111d437
Parameter Description
Group Group name (encoded)
Msg Text Message (encoded, max 160 chars)
Username Username provided to user to connect to our service
Auth Authentication with formula :
MD5(username+password)
Syntax:
http://<server_name>:8080/web2sms/api/phbkAdd.aspx?username=xxx
&name=xxx&mobile=xxx&group=xxx&address=xxx&birth=xxx&desc=xxx&auth=xxxx
Example :
http://<server_name>:8080/web2sms/api/phbkAdd.aspx?username=sms&name=Rudi
&mobile=08123456&group=Office&address=Jl. Bali&birth=19450817&desc=Direktur
Utama&auth=cd377b32c5745f89a53f6970d2f49969
Parameter Description
Username Username provided to user to connect to our service
Name Contact Name
Mobile Contact mobile number
Group Contact Group Member
Address Contact Address
Birth Contact Birthday (YYYYMMDD)
Desc Contact Description
Auth MD5(Mobile+Password)
Note : Address, Birth and Desc are optional
example :
http://<server_name>:8080/web2sms/api/phbkEdit.aspx?id=372880&username=sms&name=Yuli&
mobile=06177123454&group=Bos&address=Jl. Pati 3&birth=17 aug 2010&desc=senang main
golf&auth=3097dc123edc537e80b01b4abf1b20ef
Parameter Description
Id Contact ID Number
Username Username provided to user to connect to our service
Name Contact Name
Mobile Contact mobile number
Group Contact Group Member
Address Contact Address
Birth Contact Birthday (dd mmm yyyy)
Desc Contact Description
Auth MD5(id+password)
example :
http://<server_name>:8080/web2sms/api/phb_add.aspx?username=sms&name=Rudi
&mobile=08123456&group=Office&address=Jl. Bali&birth=19450817&desc=Direktur
Utama&auth= cd377b32c5745f89a53f6970d2f49969
Parameter Description
Id Contact ID Number
Username Username provided to user to connect to our service
Auth MD5(id+password)
example :
http://<server_name>:8080/web2sms/api/phbk_getList.aspx?page=6&size=10&username=sms&a
uth=ffb09fcbd7b381d0ff6ae1609111d437
Parameter Description
Username Username provided to user to connect to our service
page Page Number (default=1)
size number of records per page (default=10)
Auth MD5(Username+password)
example :
http://<server_name>:8080/web2sms/api/phbk_getList.aspx?page=6&size=10&username=sms&g
roup=client&auth=ffb09fcbd7b381d0ff6ae1609111d437
Parameter Description
Username Username provided to user to connect to our service
page Page Number (default=1)
size number of records per page (default=10)
group Group Name
Auth MD5(Username+password)
example :
http://<server_name>:8080/web2sms/api/phbk_getCompleteData.aspx?
id=6928&username=sms&auth=ffb09fcbd7b381d0ff6ae1609111d437
Parameter Description
id Contact ID
Username Username provided to user to connect to our service
Auth MD5(Username+password)
example : http://<server_name>:8080/web2sms/api/
phbk_findName.aspx?name=sar&username=smsoke&auth=ffb09fcbd7b381d0ff6ae1609111d437
Parameter Description
name Name to search
Username Username provided to user to connect to our service
Auth MD5(Username+password)
example : http://<server_name>:8080/web2sms/api/
phbk_findPhNumber.aspx?no=0812653&username=smsoke&auth=ffb09fcbd7b381d0ff6ae1609111d4
37
Parameter Description
name Name to search
Username Username provided to user to connect to our service
Auth MD5(Username+password)
Syntax
http://<server_name>:8080/web2sms/api/groupDelete.aspx?id=xx&username=xx&auth=xx
example :
http://<server_name>:8080/web2sms/api/groupDelete.aspx?id=849&username=sms&auth=e470a
fc416e70a44bb4e194685777255
Parameter Description
Id Group ID
Username Username provided to user to connect to our service
Auth MD5(id+password)
Parameter Description
Username Username provided to user to connect to our service
Password Password to the service
Auth MD5(username+password)
Parameter Description
Username Username provided to user to connect to our service
newpass New Password
Auth MD5(username+oldpassword)
Parameter Description
msgid Msg ID
For users who require Delivery Report on their URL they need to provide the URL in the form as below
http://<hostname>:port/dlr.php? msgid=%id&status=%s
Here
<hostname> means the IP or the domain name
<Port> means the Port number if given
%id means the msgid. %id will be replaced by the msgid.
%s means the status of the message. %s will be replaced by DELIVRD,UNDELIVRD, REJECTED or EXPIRED.
DLR URL will be using the get method to call the URL provided
Notes:
1. For searching, only return the first 10 rows
2. Each field delimited with Char(128), and records delimited with char(129).
if(!$content){
return 'Curl error: ' . curl_error($curlHandle);
}
Else {
return $content;
}
curl_close($curlHandle);
}
$mobile="62812xxxxxx";
$msg="Hallo World!";
$auth=MD5($user.$password.$ mobile);
$msg=urlencode($msg);
$myurl=http://server.dutasms.com:8080/web2sms/api/SendSMS.aspx?username="
.$user."&mobile=".$mobile."&m essage=".$msg."&auth=".$auth;
$grab = getURL($myurl);
echo $grab;
?>
Change log:
20130515, v3.2
* SendSMS.aspx, support for long sms (up to 5000 chars) and unicode (Arabic, Japanese, Chinese, etc) sms
* Send.aspx, support long sms (up to 5000 chars)
20110322, v3.1
*sendSMS.aspx, parameters trxID added.
*Send.aspx, new api, simple way to send SMS
*Status Report