Download the PHP package wearesho-team/alphasms-message-delivery without Composer
On this page you can find all versions of the php package wearesho-team/alphasms-message-delivery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wearesho-team/alphasms-message-delivery
More information about wearesho-team/alphasms-message-delivery
Files in wearesho-team/alphasms-message-delivery
Package alphasms-message-delivery
Short Description Message Delivery AlphaSMS integration
License MIT
Informations about the package alphasms-message-delivery
AlphaSMS Integration
wearesho-team/message-delivery implementation of Delivery\ServiceInterface
Installation
Cli Usage
You can use simple CLI tool to send messages and check balance:
Usage
Configuration
- ConfigInterface have to be used to configure requests. Available implementations:
- Config - simple implementation using class properties
- EnvironmentConfig - loads configuration values from environment using getenv
Variable | Required | Description |
---|---|---|
ALPHASMS_SENDER_NAME | yes | Sender Name for SMS (alpha-name) |
ALPHASMS_API_KEY | yes | Can be received on AlphaSMS Panel |
ALPHASMS_WEBHOOK_URL | no | URL for Webhooks with SMS statuses |
VoiceOTP Service
This section describes how to use the Voice OTP functionality of the AlphaSMS service.
Usage
The AlphaSMS service provides a method to send one-time passwords (OTP) via voice calls. This is useful for two-factor authentication or verification processes.
Request Parameters
id
(int): A unique identifier for the request. This can be used for tracking or reference purposes.phoneNumber
(string): The recipient's phone number in international format (e.g., 380991234567).
Response Properties
code()
(string): Returns the 4-digit OTP code that was sent to the recipient.price()
(float): Returns the cost of the voice call operation.
Error Handling
The voiceOtp() method may throw a \Wearesho\Delivery\Exception in the following cases:
- Invalid request parameters
- Network connectivity issues
- Service provider errors
- Invalid response format
Always wrap the service call in a try-catch block to handle potential exceptions.
Command Line Interface
For command-line usage, you can use the provided Symfony Console command:
Authors
- Alexander
Letnikow - Roman
Varkuta
License
MIT
All versions of alphasms-message-delivery with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.4.5
horat1us/environment-config Version ^1.5
nesbot/carbon Version ^3.0
wearesho-team/message-delivery Version ^2.2.0