-
Notifications
You must be signed in to change notification settings - Fork 3
/
help.txt
55 lines (36 loc) · 1.73 KB
/
help.txt
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
Send SMS:
Enable sending: whether the app should read from the API and send messages
send URL: messages will be parsed from this URL, you return a JSON containing message, number and id
interval: the app will check whether there is an incoming message for sending each specific interval in minutes
status URL: once a message is sent, status will be reported to this URL via GET parameters, id and status (SENT, FAILED, DELIVERED)
Receive SMS:
receive URL: Message received will be posted here. If nothing is specified it will skip this action.
How sending SMSs works
1- The application connects at regular intervals to a URL
POST https://yourcustomurl.com/send_api
deviceId: 1
action: SEND
2- It should read a JSON containing message, number and id, or an empty response if there is nothing to send
{ "message": "hola mundo!", "number": "3472664455", "messageId": "1" }
3- The app will send the SMS message to number
4- Once sent (or failed) the app will notify the status to the status URL
POST https://yourcustomurl.com/status_api
deviceId: 1
messageId: 1
status: SENT
action: STATUS
5- Once delivered the app will notify the status to the status URL
POST https://yourcustomurl.com/status_api
deviceId: 1
messageId: 1
status: DELIVERED
action: STATUS
Possible status values are: SENT, FAILED, DELIVERED (notice that it is unlikely but possible to get the DELIVERED update before the SENT update due to requests delay).
How receiving SMSs works
1- Each time a SMS is received the app will notify the received URL
POST https://yourcustomurl.com/received_api
deviceId: 1
number: 3472556699
message: Hello man!
action: RECEIVED
SEE draft: https://github.com/juancrescente/SMSHub