feat(cmd/sendsms): add back curl script for testing

This commit is contained in:
AJ ONeal 2026-02-22 15:40:33 -07:00
parent de8630c136
commit c08f7e342a
No known key found for this signature in database
2 changed files with 19 additions and 0 deletions

View File

@ -3,3 +3,4 @@
export SMSGW_BASEURL=https://smsgateway.example.com export SMSGW_BASEURL=https://smsgateway.example.com
export SMSGW_USERNAME=sms export SMSGW_USERNAME=sms
export SMSGW_PASSWORD=xxxx-xxxx-xxxx-xxxx export SMSGW_PASSWORD=xxxx-xxxx-xxxx-xxxx
export SMSGW_TEST_NUMBER=+18005551234

18
cmd/sendsms/sms-curl.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
# 2020-02-20 02:20:22
g_ts=$(date '+%F %T')
. ./.env
curl --fail-with-body -X POST "${SMSGW_BASEURL}/messages" \
--user "${SMSGW_USERNAME}:${SMSGW_PASSWORD}" \
-H 'Content-Type: application/json' \
--data-binary '
{
"textMessage":{
"text": "Test message. It'\''s '"${g_ts}"'"
},
"phoneNumbers": ["'"${SMSGW_TEST_NUMBER}"'"],
"priority":65
}
'