File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ INSIGHT_NUMBER=${INSIGHT_NUMBER:-""}
3939WEBHOOK_URL=${WEBHOOK_URL:- " " }
4040
4141# MMS
42- US_SHORT_CODE=${US_SHORT_CODE:- " " }
4342IMG_URL=${IMG_URL:- " " }
4443
4544# Reporting
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source " ../config.sh"
4+ source " ../jwt.sh"
5+
6+ curl -X POST https://api.nexmo.com/v0.1/dispatch \
7+ -H ' Authorization: Bearer ' $JWT \
8+ -H ' Content-Type: application/json' \
9+ -H ' Accept: application/json' \
10+ -d $' {
11+ "template":"failover",
12+ "workflow": [
13+ {
14+ "from": { "type": "mms", "number": ' $FROM_NUMBER ' },
15+ "to": { "type": "mms", "number": ' $TO_NUMBER ' },
16+ "message": {
17+ "content": {
18+ "type": "img",
19+ "image": { "url": "$IMG_URL" }
20+ }
21+ },
22+ "failover":{
23+ "expiry_time": 600,
24+ "condition_status": "read"
25+ }
26+ },
27+ {
28+ "from": {"type": "sms", "number": ' $FROM_NUMBER ' },
29+ "to": { "type": "sms", "number": ' $TO_NUMBER ' },
30+ "message": {
31+ "content": {
32+ "type": "text",
33+ "text": "This is an SMS sent via the Dispatch API"
34+ }
35+ }
36+ }
37+ ]
38+ }'
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33source " ../config.sh"
4- source " ../jwt.sh"
54
65curl -X POST https://api.nexmo.com/v0.1/messages \
76 -u " $NEXMO_API_KEY :$NEXMO_API_SECRET " \
@@ -10,7 +9,7 @@ curl -X POST https://api.nexmo.com/v0.1/messages \
109 -d ' {
1110 "from":{
1211 "type": "mms",
13- "number": "$US_SHORT_CODE "
12+ "number": "$FROM_NUMBER "
1413 },
1514 "to":{
1615 "type": "mms",
You can’t perform that action at this time.
0 commit comments