Sign inSign up

smsgate/cli

By smsgate

•Updated 13 days ago

A command-line interface for working with SMS Gateway for Android™.

Image
Integration & delivery
API management
0

2.8K

smsgate/cli repository overview

⁠SMS Gateway for Android™ CLI

A command-line interface for working with SMS Gateway for Android.

⁠Configuration

The CLI can be configured using environment variables or command-line flags. You can also use a .env file to set these variables.

⁠Environment 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)
⁠Command-line Flags
  • --endpoint, -e: Endpoint URL
  • --username, -u: Username
  • --password, -p: Password
  • --format, -f: Output format (supported: text, json, raw; default: text)
⁠Output Formats

The CLI supports three output formats:

  1. text: Human-readable text output (default)
  2. json: Pretty printed JSON-formatted output
  3. raw: One-line JSON-formatted output

(back to top⁠)

⁠Usage

smsgate [global options] command [command options] [arguments...]
⁠Commands
⁠Send Message

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)
⁠Get Message Status

Retrieve the status of a sent message.

smsgate status [options] Message ID

(back to top⁠)

⁠Examples

# 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
⁠Output formats
⁠Text
ID: zXDYfTmTVf3iMd16zzdBj
State: Pending
IsHashed: false
IsEncrypted: false
Recipients: 
        +19162255887    Pending
        +19162255888    Pending
⁠JSON
{
  "id": "zXDYfTmTVf3iMd16zzdBj",
  "state": "Pending",
  "isHashed": false,
  "isEncrypted": false,
  "recipients": [
    {
      "phoneNumber": "+19162255887",
      "state": "Pending"
    },
    {
      "phoneNumber": "+19162255888",
      "state": "Pending"
    }
  ],
  "states": {}
}
⁠Raw
{"id":"zXDYfTmTVf3iMd16zzdBj","state":"Pending","isHashed":false,"isEncrypted":false,"recipients":[{"phoneNumber":"+19162255887","state":"Pending"},{"phoneNumber":"+19162255888","state":"Pending"}],"states":{}}

(back to top⁠)

⁠Support

For support, please contact [email protected]⁠

(back to top⁠)

⁠License

Distributed under the Apache-2.0 license. See LICENSE⁠ for more information.

(back to top⁠)

Android is a trademark of Google LLC.

(back to top⁠)

Tag summary

Content type

Image

Digest

sha256:29de3a9b2…

Size

12.3 MB

Last updated

13 days ago

docker pull smsgate/cli