Discover Packages
github.com/boxlinknet/kwtsms-go
examples
01-basic-usage
command
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: Mar 13, 2026
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
01 - Basic Usage
Demonstrates the simplest kwtsms-go workflow: load credentials, verify the account, check the balance, and send a single SMS.
What it does
Loads API credentials from environment variables or a .env file
Calls Verify() to confirm credentials and fetch the balance
Sends a test SMS to a single Kuwait number
Prints the send result, including message ID and remaining balance
Running
cd examples/01-basic-usage
cp ../../.env.example .env # edit with your credentials
go run main.go
Replace the phone number in main.go with a real number you own.
Set KWTSMS_TEST_MODE=1 in your .env to avoid consuming credits.
Expand ▾
Collapse ▴
Documentation
¶
Example 01: Basic usage of kwtsms-go.
Loads credentials from env/.env, verifies the account, prints the balance,
sends a test SMS, and prints the result.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.