Skip to content

Commit 5268fd9

Browse files
committed
Updating WhatsApp code snippets
1 parent 7cf8571 commit 5268fd9

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

messages/whatsapp/send-button-quick-reply.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ curl -X POST "${MESSAGES_API_URL}" \
2525
"type": "header",
2626
"parameters": [
2727
{
28-
"type": "text",
29-
"parameter_name": "appointment_date_1",
30-
"text": "26th of February 2025"
28+
"type": "image",
29+
"image": {
30+
"link": "'${MESSAGES_IMAGE_URL}'"
31+
}
3132
}
3233
]
3334
},
@@ -46,7 +47,7 @@ curl -X POST "${MESSAGES_API_URL}" \
4647
},
4748
{
4849
"type": "text",
49-
"parameter_name": "appointment_date_2",
50+
"parameter_name": "appointment_date",
5051
"text": "2025-02-26"
5152
},
5253
{

messages/whatsapp/send-sticker-id.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
source "../../config.sh"
44
source "../../jwt.sh"
55

6-
curl -X POST $MESSAGES_API_URL \
7-
-H 'Authorization: Bearer '$JWT \
8-
-H 'Content-Type: application/json' \
9-
-H 'Accept: application/json' \
10-
-d $'{
11-
"message_type": "sticker",
12-
"sticker": {
13-
"id": "'$STICKER_ID'"
14-
},
15-
"to": "'$TO_NUMBER'",
16-
"from": "'$WHATSAPP_NUMBER'",
17-
"channel": "whatsapp"
18-
}'
6+
curl -X POST "${MESSAGES_API_URL}" \
7+
-H "Authorization: Bearer ${JWT}"\
8+
-H 'Content-Type: application/json' \
9+
-H 'Accept: application/json' \
10+
-d $'{
11+
"to": "'${MESSAGES_TO_NUMBER}'",
12+
"from": "'${WHATSAPP_SENDER_ID}'",
13+
"channel": "whatsapp",
14+
"message_type": "sticker",
15+
"sticker": {
16+
"id": "'${WHATSAPP_STICKER_ID}'"
17+
}
18+
}'

messages/whatsapp/send-sticker-url.sh

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
source "../../config.sh"
44
source "../../jwt.sh"
55

6-
curl -X POST $MESSAGES_API_URL \
7-
-H 'Authorization: Bearer '$JWT \
8-
-H 'Content-Type: application/json' \
9-
-H 'Accept: application/json' \
10-
-d $'{
11-
"message_type": "sticker",
12-
"sticker": {
13-
"url": "'$STICKER_URL'"
14-
},
15-
"to": "'$TO_NUMBER'",
16-
"from": "'$WHATSAPP_NUMBER'",
17-
"channel": "whatsapp"
18-
}'
6+
curl -X POST "${MESSAGES_API_URL}" \
7+
-H "Authorization: Bearer ${JWT}"\
8+
-H 'Content-Type: application/json' \
9+
-H 'Accept: application/json' \
10+
-d $'{
11+
"to": "'${MESSAGES_TO_NUMBER}'",
12+
"from": "'${WHATSAPP_SENDER_ID}'",
13+
"channel": "whatsapp",
14+
"message_type": "sticker",
15+
"sticker": {
16+
"url": "'${WHATSAPP_STICKER_URL}'"
17+
}
18+
}'

0 commit comments

Comments
 (0)