/
WEBSERVICES
104 lines (78 loc) · 3.05 KB
/
WEBSERVICES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
WEBSERVICES ACCESS
------------------
URL: http://[playSMS_web_domain_or_url]/index.php?app=webservices
PARAMETERS
----------
u : username
p : password
ta : type of action
for example:
pv : send private
bc : send broadcast
ds : delivery status
sms_poll : poll results from plugin sms_poll
sms_board : board results from plugin sms_board
to : destination numbers (for ta=pv) or destination group code (for ta=bc)
multiple destination numbers (seperated by comma) can be used when ta=pv
msg : message
type : message type (flash or text)
unicode : whether message unicode or not (1=unicode, 0=not unicode)
last : last SMS log ID (this number not included on result)
c : number of delivery status that will be retrieved
slid : SMS Log ID (for ta=ds, when slid defined 'last' and 'c' has no effect)
ERROR RETURNS
-------------
Successful actions:
OK : action successfully executed and returns nothing
this is only when "ta=bc"
OK [SMS_LOG_ID],[QUEUE_CODE] : action successfully executed and returns an SMS Log ID
and Queue Code
OK [NUMBER],[SMS_LOG_ID],[QUEUE_CODE] : action successfully executed and returns destination
number, it's SMS Log ID and it's Queue Code
this is only when "ta=pv" and "to" contains multiple
destinations
OK [CREDIT] : action successfully executed and returns user's credit
Unsuccessful actions:
ERR 100 : authentication failed
ERR 101 : type of action not valid
ERR 102 : one or more field empty
ERR 200 : send private failed
ERR 201 : destination number or message is empty
ERR 300 : send broadcast failed
ERR 301 : destination group or message is empty
ERR 400 : no delivery status retrieved
PROTOCOL
--------
1. Send SMS
ta : pv
parameters : u, p, to, msg, type, unicode
returns : error returns
notes : to parameter is a valid international formatted mobile number
2. Send broadcast SMS
ta : bc
parameters : u, p, to, msg, type, unicode
returns : error returns
notes : to parameter is group code
3. Delivery reports
ta : ds
parameters : u, p, slid, c, last
returns : formatted text:
SMS log ID; Source number; Destination Number; Message; Delivery Time;
Update Pending Status Time; SMS Status
notes : slid retrieves only 1 delivery report at particular SMS log ID
c retrieves as many as c value
last retrieves from last SMS log ID
4. User credits
ta : cr
parameters : u, p
returns : user's credit
EXAMPLE
-------
Webservice URL:
http://x.com/index.php?app=webservices&ta=bc&u=admin&p=rahasia&to=TI&msg=meeting+at+15.00+today!
Explanation:
User admin access playSMS webservices in x.com with type of action bc (broadcast)
if succeded returns: OK SMS_LOG_ID (eg: OK 754)
if error occured returns one of the ERROR RETURNS mentioned above
--
Anton Raharja