A command-line interface for working with SMS Gateway for Android™.
2.8K
A command-line interface for working with SMS Gateway for Android.
The CLI can be configured using environment variables or command-line flags. You can also use a .env file to set these variables.
All environment variables are prefixed with ASG_:
ASG_ENDPOINT: The endpoint URL (default: https://api.sms-gate.app/3rdparty/v1)ASG_USERNAME: Your username (required)ASG_PASSWORD: Your password (required)--endpoint, -e: Endpoint URL--username, -u: Username--password, -p: Password--format, -f: Output format (supported: text, json, raw; default: text)The CLI supports three output formats:
text: Human-readable text output (default)json: Pretty printed JSON-formatted outputraw: One-line JSON-formatted outputsmsgate [global options] command [command options] [arguments...]
Send an SMS message.
smsgate send [options] Message content
Options:
--id value: Message ID (optional, generated if not specified)--phones value, -p value, --phone value: Phone numbers (can be specified multiple times or comma-separated)--sim value: SIM card index (1-3) (default: 0)--ttl value: Time to live as duration string like "1h30m" (default: unlimited)--validUntil value: Valid until (format: YYYY-MM-DD HH:MM:SS in local timezone)Retrieve the status of a sent message.
smsgate status [options] Message ID
# Send a message
smsgate send --phone '+19162255887' 'Hello, Dr. Turk!'
# Send a message to multiple numbers
smsgate send --phone '+19162255887' --phone '+19162255888' 'Hello, Dr. Turk!'
# or
smsgate send --phones '+19162255887,+19162255888' 'Hello, Dr. Turk!'
# Get the status of a sent message
smsgate status zXDYfTmTVf3iMd16zzdBj
ID: zXDYfTmTVf3iMd16zzdBj
State: Pending
IsHashed: false
IsEncrypted: false
Recipients:
+19162255887 Pending
+19162255888 Pending
{
"id": "zXDYfTmTVf3iMd16zzdBj",
"state": "Pending",
"isHashed": false,
"isEncrypted": false,
"recipients": [
{
"phoneNumber": "+19162255887",
"state": "Pending"
},
{
"phoneNumber": "+19162255888",
"state": "Pending"
}
],
"states": {}
}
{"id":"zXDYfTmTVf3iMd16zzdBj","state":"Pending","isHashed":false,"isEncrypted":false,"recipients":[{"phoneNumber":"+19162255887","state":"Pending"},{"phoneNumber":"+19162255888","state":"Pending"}],"states":{}}
For support, please contact [email protected]
Distributed under the Apache-2.0 license. See LICENSE for more information.
Android is a trademark of Google LLC.
Content type
Image
Digest
sha256:29de3a9b2…
Size
12.3 MB
Last updated
13 days ago
docker pull smsgate/cli