
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Unified Messaging Gateway is an all-in-one platform for sending and managing SMS, WhatsApp, and Email messages. It offers a single API and dashboard for seamless communication, making it easy to handle alerts, marketing, and customer support across multiple channels
A Python SDK for Softlink's SMS Gateway - a reliable and efficient platform for sending SMS messages in Kenya and beyond. This SDK provides a simple interface to integrate Softlink's SMS services into your Python applications.
Softlink SMS Gateway is a leading provider of SMS services in Kenya, offering:
pip install softlink
You can configure the SMS client in two ways:
Set the following environment variable:
export SOFTLINK_SMS_API_KEY='your_consumer_key'
from softlink import SMSConfig
# Using consumer key
config = SMSConfig(
consumer_key='your_consumer_key'
)
# Or use default configuration from environment
config = SMSConfig()
from softlink import SMSClient
# Using environment variables
client = SMSClient()
# Send SMS
results = client.send_sms({
"message": "Jambo Kenya",
"recipients": ["+254713164545"]
})
from softlink import SMSClient, SMSConfig
# Using consumer key
config = SMSConfig(
consumer_key='your_consumer_key'
)
client = SMSClient(config)
The library provides a comprehensive set of exceptions for better error handling:
from softlink import (
SMSClient,
SoftlinkException,
APIError,
APIConnectionError,
AuthenticationError,
InvalidRequestError,
RateLimitError,
SMSError,
SMSDeliveryError,
SMSValidationError,
SMSQuotaError
)
try:
client = SMSClient()
results = client.send_sms({
"message": "Jambo Kenya",
"recipients": ["+254713164545"]
})
except AuthenticationError as e:
print(f"Authentication failed: {e}")
except SMSValidationError as e:
print(f"Invalid input: {e}")
except SMSDeliveryError as e:
print(f"Message delivery failed: {e}")
except SMSQuotaError as e:
print(f"Quota exceeded: {e}")
except RateLimitError as e:
print(f"Rate limit exceeded: {e}")
except APIConnectionError as e:
print(f"Network error: {e}")
except APIError as e:
print(f"API error: {e}")
except SoftlinkException as e:
print(f"General error: {e}")
SoftlinkException
: Base exception class for all SDK exceptionsAPIError
: Raised when the API returns an error responseAPIConnectionError
: Raised when network communication failsAuthenticationError
: Raised when authentication failsInvalidRequestError
: Raised when invalid parameters are passedRateLimitError
: Raised when too many requests are madeSMSError
: Base exception for SMS-specific errorsSMSDeliveryError
: Raised when SMS delivery failsSMSValidationError
: Raised when SMS validation failsSMSQuotaError
: Raised when SMS quota is exceeded__init__(config: Optional[SMSConfig] = None)
Initialize the SMS client with configuration.
send_sms(payload: dict) -> dict
Send SMS messages to recipients.
Parameters:
payload
(dict): Dictionary containing:
message
(str): The message contentrecipients
(List[str]): List of recipient phone numbers in E.164 format (e.g., +254713164545)Returns:
dict
: Response from the API containing message status and detailsConfiguration class for managing API credentials.
Parameters:
consumer_key
(Optional[str]): Consumer key for authentication. If not provided, will try to load from environment variable SOFTLINK_SMS_API_KEYPhone Number Format
Message Content
Error Handling
For support, please contact:
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Unified Messaging Gateway is an all-in-one platform for sending and managing SMS, WhatsApp, and Email messages. It offers a single API and dashboard for seamless communication, making it easy to handle alerts, marketing, and customer support across multiple channels
We found that softlink demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.