@corbit2/node-red-corbit-sms 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/examples/send-otp-and-check-delivery.json +156 -156
- package/nodes/corbit-sms.html +351 -351
- package/nodes/lib/corbit.js +449 -428
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.2 (2026-11-08)
|
|
4
|
+
|
|
5
|
+
- Lists of numbers are read like the Corbit SMS app: the Arabic comma and semicolon (« ، » « ؛ », typed by the Arabic iPhone keyboard) and tabs (from a spreadsheet) separate numbers too, and numbers separated only by spaces are read one by one. A number copied from phone contacts with spaces, such as `+966 50 123 4567`, stays one number.
|
|
6
|
+
|
|
7
|
+
## 1.0.1 (2026-11-08)
|
|
8
|
+
|
|
9
|
+
- No change to the node itself.
|
|
10
|
+
- Tests now also run on Node.js 18 with Node-RED 3, and CI checks Node.js 18, 20, 22 and 24 with Node-RED 3, 4 and 5.
|
|
11
|
+
- Published from GitHub Actions with npm provenance.
|
|
12
|
+
|
|
3
13
|
## 1.0.0 (2026-11-08)
|
|
4
14
|
|
|
5
15
|
First release.
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ By default the node reads these message properties. Each field can be changed to
|
|
|
49
49
|
|---|---|---|
|
|
50
50
|
| `msg.payload` | Send, Send to many | Text of the SMS, up to 1600 characters. Numbers (such as an OTP) are accepted. |
|
|
51
51
|
| `msg.to` | Send | Mobile number, e.g. `966501234567` |
|
|
52
|
-
| `msg.numbers` | Send to many | Array of numbers, or text separated by commas
|
|
52
|
+
| `msg.numbers` | Send to many | Array of numbers, or text separated by commas (also the Arabic « ، »), semicolons, tabs, new lines or spaces |
|
|
53
53
|
| `msg.messageId` | Get status, Get report | The `messageId` returned by a send |
|
|
54
54
|
| `msg.sender` | Send, Send to many | Sender name, used when the **Sender** field is empty |
|
|
55
55
|
| `msg.allowDuplicate` | Send, Send to many | `true` or `false`; overrides the **Duplicates** box |
|
|
@@ -104,7 +104,7 @@ Import them from **Menu → Import → Examples → @corbit2/node-red-corbit-sms
|
|
|
104
104
|
## Requirements
|
|
105
105
|
|
|
106
106
|
- Node-RED 3.0 or later (tested with Node-RED 3.1, 4.1 and 5.0)
|
|
107
|
-
- Node.js 18.17 or later (tested with Node.js 24)
|
|
107
|
+
- Node.js 18.17 or later (tested with Node.js 18, 20, 22 and 24)
|
|
108
108
|
|
|
109
109
|
## Links
|
|
110
110
|
|
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"id": "c0b1e7a4d2f00001",
|
|
4
|
-
"type": "comment",
|
|
5
|
-
"name": "Send a one-time code, wait 30 seconds, then read its delivery status",
|
|
6
|
-
"info": "1. Open the Corbit SMS account node and paste your API token from sms.corbit.sa.\n2. In \"Send OTP\", click \"Load my sender names\" and pick an approved sender name.\n3. Change msg.to in the inject node to your own mobile number, deploy and click the inject button.",
|
|
7
|
-
"x": 310,
|
|
8
|
-
"y": 60,
|
|
9
|
-
"wires": []
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"id": "c0b1e7a4d2f00002",
|
|
13
|
-
"type": "inject",
|
|
14
|
-
"name": "OTP request",
|
|
15
|
-
"props": [
|
|
16
|
-
{ "p": "payload" },
|
|
17
|
-
{ "p": "to", "v": "966501234567", "vt": "str" }
|
|
18
|
-
],
|
|
19
|
-
"repeat": "",
|
|
20
|
-
"once": false,
|
|
21
|
-
"topic": "",
|
|
22
|
-
"payload": "Your verification code is 4821",
|
|
23
|
-
"payloadType": "str",
|
|
24
|
-
"x": 130,
|
|
25
|
-
"y": 120,
|
|
26
|
-
"wires": [["c0b1e7a4d2f00003"]]
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"id": "c0b1e7a4d2f00003",
|
|
30
|
-
"type": "corbit-sms",
|
|
31
|
-
"name": "Send OTP",
|
|
32
|
-
"account": "c0b1e7a4d2f000a1",
|
|
33
|
-
"operation": "send",
|
|
34
|
-
"sender": "YourSender",
|
|
35
|
-
"senderType": "str",
|
|
36
|
-
"to": "to",
|
|
37
|
-
"toType": "msg",
|
|
38
|
-
"numbers": "numbers",
|
|
39
|
-
"numbersType": "msg",
|
|
40
|
-
"message": "payload",
|
|
41
|
-
"messageType": "msg",
|
|
42
|
-
"messageId": "messageId",
|
|
43
|
-
"messageIdType": "msg",
|
|
44
|
-
"idempotencyKey": "",
|
|
45
|
-
"idempotencyKeyType": "none",
|
|
46
|
-
"allowDuplicate": true,
|
|
47
|
-
"senderStatus": "all",
|
|
48
|
-
"x": 310,
|
|
49
|
-
"y": 120,
|
|
50
|
-
"wires": [["c0b1e7a4d2f00004", "c0b1e7a4d2f00007"]]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"id": "c0b1e7a4d2f00004",
|
|
54
|
-
"type": "delay",
|
|
55
|
-
"name": "Wait 30 s",
|
|
56
|
-
"pauseType": "delay",
|
|
57
|
-
"timeout": "30",
|
|
58
|
-
"timeoutUnits": "seconds",
|
|
59
|
-
"rate": "1",
|
|
60
|
-
"nbRateUnits": "1",
|
|
61
|
-
"rateUnits": "second",
|
|
62
|
-
"randomFirst": "1",
|
|
63
|
-
"randomLast": "5",
|
|
64
|
-
"randomUnits": "seconds",
|
|
65
|
-
"drop": false,
|
|
66
|
-
"allowrate": false,
|
|
67
|
-
"outputs": 1,
|
|
68
|
-
"x": 490,
|
|
69
|
-
"y": 120,
|
|
70
|
-
"wires": [["c0b1e7a4d2f00005"]]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"id": "c0b1e7a4d2f00005",
|
|
74
|
-
"type": "corbit-sms",
|
|
75
|
-
"name": "Get status",
|
|
76
|
-
"account": "c0b1e7a4d2f000a1",
|
|
77
|
-
"operation": "getStatus",
|
|
78
|
-
"sender": "",
|
|
79
|
-
"senderType": "str",
|
|
80
|
-
"to": "to",
|
|
81
|
-
"toType": "msg",
|
|
82
|
-
"numbers": "numbers",
|
|
83
|
-
"numbersType": "msg",
|
|
84
|
-
"message": "payload",
|
|
85
|
-
"messageType": "msg",
|
|
86
|
-
"messageId": "payload.messageId",
|
|
87
|
-
"messageIdType": "msg",
|
|
88
|
-
"idempotencyKey": "",
|
|
89
|
-
"idempotencyKeyType": "none",
|
|
90
|
-
"allowDuplicate": false,
|
|
91
|
-
"senderStatus": "all",
|
|
92
|
-
"x": 660,
|
|
93
|
-
"y": 120,
|
|
94
|
-
"wires": [["c0b1e7a4d2f00006"]]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"id": "c0b1e7a4d2f00006",
|
|
98
|
-
"type": "debug",
|
|
99
|
-
"name": "Delivery status",
|
|
100
|
-
"active": true,
|
|
101
|
-
"tosidebar": true,
|
|
102
|
-
"console": false,
|
|
103
|
-
"tostatus": true,
|
|
104
|
-
"complete": "payload",
|
|
105
|
-
"targetType": "msg",
|
|
106
|
-
"statusVal": "payload.status",
|
|
107
|
-
"statusType": "msg",
|
|
108
|
-
"x": 850,
|
|
109
|
-
"y": 120,
|
|
110
|
-
"wires": []
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"id": "c0b1e7a4d2f00007",
|
|
114
|
-
"type": "debug",
|
|
115
|
-
"name": "Sent",
|
|
116
|
-
"active": true,
|
|
117
|
-
"tosidebar": true,
|
|
118
|
-
"console": false,
|
|
119
|
-
"tostatus": false,
|
|
120
|
-
"complete": "payload",
|
|
121
|
-
"targetType": "msg",
|
|
122
|
-
"x": 490,
|
|
123
|
-
"y": 180,
|
|
124
|
-
"wires": []
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"id": "c0b1e7a4d2f00008",
|
|
128
|
-
"type": "catch",
|
|
129
|
-
"name": "Corbit SMS errors",
|
|
130
|
-
"scope": ["c0b1e7a4d2f00003", "c0b1e7a4d2f00005"],
|
|
131
|
-
"uncaught": false,
|
|
132
|
-
"x": 160,
|
|
133
|
-
"y": 240,
|
|
134
|
-
"wires": [["c0b1e7a4d2f00009"]]
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
"id": "c0b1e7a4d2f00009",
|
|
138
|
-
"type": "debug",
|
|
139
|
-
"name": "Error details",
|
|
140
|
-
"active": true,
|
|
141
|
-
"tosidebar": true,
|
|
142
|
-
"console": false,
|
|
143
|
-
"tostatus": false,
|
|
144
|
-
"complete": "corbitError",
|
|
145
|
-
"targetType": "msg",
|
|
146
|
-
"x": 370,
|
|
147
|
-
"y": 240,
|
|
148
|
-
"wires": []
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"id": "c0b1e7a4d2f000a1",
|
|
152
|
-
"type": "corbit-sms-account",
|
|
153
|
-
"name": "Corbit SMS account",
|
|
154
|
-
"baseUrl": "https://api.corbit.sa"
|
|
155
|
-
}
|
|
156
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "c0b1e7a4d2f00001",
|
|
4
|
+
"type": "comment",
|
|
5
|
+
"name": "Send a one-time code, wait 30 seconds, then read its delivery status",
|
|
6
|
+
"info": "1. Open the Corbit SMS account node and paste your API token from sms.corbit.sa.\n2. In \"Send OTP\", click \"Load my sender names\" and pick an approved sender name.\n3. Change msg.to in the inject node to your own mobile number, deploy and click the inject button.",
|
|
7
|
+
"x": 310,
|
|
8
|
+
"y": 60,
|
|
9
|
+
"wires": []
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "c0b1e7a4d2f00002",
|
|
13
|
+
"type": "inject",
|
|
14
|
+
"name": "OTP request",
|
|
15
|
+
"props": [
|
|
16
|
+
{ "p": "payload" },
|
|
17
|
+
{ "p": "to", "v": "966501234567", "vt": "str" }
|
|
18
|
+
],
|
|
19
|
+
"repeat": "",
|
|
20
|
+
"once": false,
|
|
21
|
+
"topic": "",
|
|
22
|
+
"payload": "Your verification code is 4821",
|
|
23
|
+
"payloadType": "str",
|
|
24
|
+
"x": 130,
|
|
25
|
+
"y": 120,
|
|
26
|
+
"wires": [["c0b1e7a4d2f00003"]]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "c0b1e7a4d2f00003",
|
|
30
|
+
"type": "corbit-sms",
|
|
31
|
+
"name": "Send OTP",
|
|
32
|
+
"account": "c0b1e7a4d2f000a1",
|
|
33
|
+
"operation": "send",
|
|
34
|
+
"sender": "YourSender",
|
|
35
|
+
"senderType": "str",
|
|
36
|
+
"to": "to",
|
|
37
|
+
"toType": "msg",
|
|
38
|
+
"numbers": "numbers",
|
|
39
|
+
"numbersType": "msg",
|
|
40
|
+
"message": "payload",
|
|
41
|
+
"messageType": "msg",
|
|
42
|
+
"messageId": "messageId",
|
|
43
|
+
"messageIdType": "msg",
|
|
44
|
+
"idempotencyKey": "",
|
|
45
|
+
"idempotencyKeyType": "none",
|
|
46
|
+
"allowDuplicate": true,
|
|
47
|
+
"senderStatus": "all",
|
|
48
|
+
"x": 310,
|
|
49
|
+
"y": 120,
|
|
50
|
+
"wires": [["c0b1e7a4d2f00004", "c0b1e7a4d2f00007"]]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"id": "c0b1e7a4d2f00004",
|
|
54
|
+
"type": "delay",
|
|
55
|
+
"name": "Wait 30 s",
|
|
56
|
+
"pauseType": "delay",
|
|
57
|
+
"timeout": "30",
|
|
58
|
+
"timeoutUnits": "seconds",
|
|
59
|
+
"rate": "1",
|
|
60
|
+
"nbRateUnits": "1",
|
|
61
|
+
"rateUnits": "second",
|
|
62
|
+
"randomFirst": "1",
|
|
63
|
+
"randomLast": "5",
|
|
64
|
+
"randomUnits": "seconds",
|
|
65
|
+
"drop": false,
|
|
66
|
+
"allowrate": false,
|
|
67
|
+
"outputs": 1,
|
|
68
|
+
"x": 490,
|
|
69
|
+
"y": 120,
|
|
70
|
+
"wires": [["c0b1e7a4d2f00005"]]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "c0b1e7a4d2f00005",
|
|
74
|
+
"type": "corbit-sms",
|
|
75
|
+
"name": "Get status",
|
|
76
|
+
"account": "c0b1e7a4d2f000a1",
|
|
77
|
+
"operation": "getStatus",
|
|
78
|
+
"sender": "",
|
|
79
|
+
"senderType": "str",
|
|
80
|
+
"to": "to",
|
|
81
|
+
"toType": "msg",
|
|
82
|
+
"numbers": "numbers",
|
|
83
|
+
"numbersType": "msg",
|
|
84
|
+
"message": "payload",
|
|
85
|
+
"messageType": "msg",
|
|
86
|
+
"messageId": "payload.messageId",
|
|
87
|
+
"messageIdType": "msg",
|
|
88
|
+
"idempotencyKey": "",
|
|
89
|
+
"idempotencyKeyType": "none",
|
|
90
|
+
"allowDuplicate": false,
|
|
91
|
+
"senderStatus": "all",
|
|
92
|
+
"x": 660,
|
|
93
|
+
"y": 120,
|
|
94
|
+
"wires": [["c0b1e7a4d2f00006"]]
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "c0b1e7a4d2f00006",
|
|
98
|
+
"type": "debug",
|
|
99
|
+
"name": "Delivery status",
|
|
100
|
+
"active": true,
|
|
101
|
+
"tosidebar": true,
|
|
102
|
+
"console": false,
|
|
103
|
+
"tostatus": true,
|
|
104
|
+
"complete": "payload",
|
|
105
|
+
"targetType": "msg",
|
|
106
|
+
"statusVal": "payload.status",
|
|
107
|
+
"statusType": "msg",
|
|
108
|
+
"x": 850,
|
|
109
|
+
"y": 120,
|
|
110
|
+
"wires": []
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id": "c0b1e7a4d2f00007",
|
|
114
|
+
"type": "debug",
|
|
115
|
+
"name": "Sent",
|
|
116
|
+
"active": true,
|
|
117
|
+
"tosidebar": true,
|
|
118
|
+
"console": false,
|
|
119
|
+
"tostatus": false,
|
|
120
|
+
"complete": "payload",
|
|
121
|
+
"targetType": "msg",
|
|
122
|
+
"x": 490,
|
|
123
|
+
"y": 180,
|
|
124
|
+
"wires": []
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "c0b1e7a4d2f00008",
|
|
128
|
+
"type": "catch",
|
|
129
|
+
"name": "Corbit SMS errors",
|
|
130
|
+
"scope": ["c0b1e7a4d2f00003", "c0b1e7a4d2f00005"],
|
|
131
|
+
"uncaught": false,
|
|
132
|
+
"x": 160,
|
|
133
|
+
"y": 240,
|
|
134
|
+
"wires": [["c0b1e7a4d2f00009"]]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"id": "c0b1e7a4d2f00009",
|
|
138
|
+
"type": "debug",
|
|
139
|
+
"name": "Error details",
|
|
140
|
+
"active": true,
|
|
141
|
+
"tosidebar": true,
|
|
142
|
+
"console": false,
|
|
143
|
+
"tostatus": false,
|
|
144
|
+
"complete": "corbitError",
|
|
145
|
+
"targetType": "msg",
|
|
146
|
+
"x": 370,
|
|
147
|
+
"y": 240,
|
|
148
|
+
"wires": []
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"id": "c0b1e7a4d2f000a1",
|
|
152
|
+
"type": "corbit-sms-account",
|
|
153
|
+
"name": "Corbit SMS account",
|
|
154
|
+
"baseUrl": "https://api.corbit.sa"
|
|
155
|
+
}
|
|
156
|
+
]
|