Download the PHP package calisero/calisero-php without Composer
On this page you can find all versions of the php package calisero/calisero-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download calisero/calisero-php
More information about calisero/calisero-php
Files in calisero/calisero-php
Package calisero-php
Short Description Official PHP library for Calisero SMS API
License MIT
Informations about the package calisero-php
Calisero PHP SMS API Library
Official PHP library for the Calisero transactional SMS API.
Send SMS messages, manage opt-outs for GDPR compliance, and monitor your accountβall with a simple, type-safe PHP library that just works.
Features
- π Simple & Intuitive: Easy-to-use API with clean factory methods
- π Type Safe: Full PHP type declarations and PHPStan level 9 compliance
- π Self-Contained: Built-in HTTP client using cURL, no external dependencies
- π Idempotency: Built-in idempotency key generation for safe retries
- π± Complete API Coverage: All Calisero SMS API endpoints supported
- π‘οΈ Error Handling: Comprehensive exception hierarchy for different error types
- π Rich Examples: 14+ working examples covering every use case
- β‘ Zero Configuration: Works immediately after installation
- ποΈ Production Ready: Used in production by businesses worldwide
- οΏ½ Minimal Dependencies: Only requires PHP and basic extensions
- π― Laravel Integration: Official Laravel wrapper
calisero/laravel-smsavailable
Requirements
- PHP 7.4 or higher
ext-jsonextensionext-curlextension
Installation
Install the library via Composer:
That's it! The library includes its own HTTP client implementation and requires no additional dependencies.
Getting Your API Key
To use this library, you'll need an API key from your Calisero account:
- Log in to your Calisero account at https://calisero.ro
- Navigate to the dashboard and go to the "API Keys" section
- Click "Add Key" to create a new API key
- Configure your key:
- Give it a descriptive name (e.g., "Production App", "Development")
- Set IP filters if needed for additional security
- Choose appropriate permissions
- Copy your API key and store it securely
API Key Management
From the API Keys section in your dashboard, you can:
- β Add new keys for different applications or environments
- βοΈ Edit existing keys to update names or permissions
- ποΈ Delete keys that are no longer needed
- π‘οΈ Add IP filters to restrict key usage to specific IP addresses
- π Monitor key usage and activity logs
Security Note: Never commit API keys to version control. Use environment variables or secure configuration files.
Quick Start
Basic SMS Sending
Environment Configuration
For production applications, store your API key securely:
π― Common Use Cases
OTP/2FA Authentication
Order Notifications
Marketing Campaigns with Opt-out Compliance
Advanced Message Creation
Authentication
Using API Key (Bearer Token)
Custom Authentication Provider
π Examples
This library includes comprehensive examples for all operations. Check the examples/ directory for detailed usage patterns:
π± Message Examples
examples/messages/send_simple_sms.php- Send basic SMS messagesexamples/messages/send_advanced_sms.php- Advanced SMS with scheduling, callbacks, custom senderexamples/messages/send_bulk_sms.php- Bulk SMS with rate limiting and error handlingexamples/messages/get_sms.php- Retrieve message details and statusexamples/messages/list_sms.php- List messages with paginationexamples/messages/delete_sms.php- Cancel scheduled messages
π« OptOut Examples (GDPR Compliance)
examples/optouts/create_optout.php- Add phone numbers to opt-out listexamples/optouts/get_optout.php- Check opt-out statusexamples/optouts/list_optouts.php- List all opt-outs with paginationexamples/optouts/update_optout.php- Update opt-out reasonsexamples/optouts/delete_optout.php- Remove opt-out (re-enable SMS)
β Verification Examples (OTP)
examples/verifications/create_verification.php- Start a verification (send OTP)examples/verifications/get_verification.php- Retrieve verification detailsexamples/verifications/list_verifications.php- List verifications with pagination and status filterexamples/verifications/validate_verification.php- Validate an OTP code for a phone number
π€ Account Examples
examples/account/get_account.php- Get account information and detailsexamples/account/check_balance.php- Check balance with analysis and recommendations
π‘οΈ Error Handling
examples/error_handling_complete.php- Comprehensive error handling for all exception types
π Running Examples
-
Clone this repository and install dependencies:
-
Set your API key in any example file:
- Run an example:
Note: Examples use masked phone numbers (
+40742***350) for security. Replace with actual phone numbers when testing.
API Reference
Messages
Send a Message
Get Message Details
List Messages
Delete a Message
Verifications (OTP)
Create a Verification
Get Verification Details
List Verifications
Validate a Verification Code (OTP)
Opt-outs
Create an Opt-out
List Opt-outs
Update an Opt-out
Delete an Opt-out
Accounts
Get Account Information
Error Handling
The library provides specific exception types for different error scenarios:
Advanced Configuration
Simple Client Creation
The library uses a simplified approach with built-in HTTP client:
The library uses an optimized cURL-based HTTP client internally, providing excellent performance without external dependencies.
Custom Idempotency Key Provider
Testing
The library includes comprehensive test coverage:
Testing Your Implementation
Contributing
Please see CONTRIBUTING.md for details on how to contribute to this project.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
This library is open-sourced software licensed under the MIT license.
Support
- Documentation: Official API Docs
- GitHub Issues: Report Issues
-
Email Support: [email protected]
- π§ Email: [email protected]
- π Documentation: https://docs.calisero.ro
- π Issues: GitHub Issues
Changelog
Please see CHANGELOG.md for more information on what has changed recently.
All versions of calisero-php with dependencies
ext-json Version *
ext-curl Version *