Download the PHP package alizne/smsapi without Composer

On this page you can find all versions of the php package alizne/smsapi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package smsapi

SMSApi

فارسی

Tests Latest Version Total Downloads

Laravel package for Iranian SMS panels. Supports Laravel 10–13 on PHP 8.1+ (Laravel 13 requires PHP 8.3+). One API covers sms.ir, Kavenegar, Ghasedak, Melipayamak, Farazsms, Magfa, IPPanel, Niksms, Mediana, Avanak, LimoSMS, Amoot, Farapayamak, Payamito, Payamaknovin, Bahmanpayam, Payamresan, Behinpayam, Rastinsms, and other Iranian panels.

It also sends through Telegram, WhatsApp, Bale, Eitaa, Rubika, Gap, and iGap.

Use it to ship OTP delivery, multi-panel failover, and the rest of the outbound flow without a one-off client per provider.


Install

.env:

Local development without a real panel:

Optional features (logging, OTP vault, rate limiter, webhook) are off until you install them:


Usage

Failover

Or in .env:

A read timeout does not mean the provider rejected the message. The panel may already have accepted it, so failing over — or retrying the queue job — can send the same SMS twice. The default request timeout is 10 seconds and the connect timeout is 5 seconds. Keep the queue job timeout greater than timeout × number of failover drivers.

Templates

Define the template in config/smsapi.php, then send it by logical name:

Sms::otp() only delivers. You still generate the OTP code yourself.

OTP vault — issue and check a code

The code is stored as an HMAC (not plaintext), with an expiry and an attempt limit.

Queues

Laravel notifications

Tests


Supported drivers

The config key is what you set as SMSAPI_DRIVER or pass to Sms::driver('…').

SMS (Iran)

Config Provider
smsir sms.ir
kavenegar Kavenegar
ghasedak Ghasedak
melipayamak Melipayamak
farazsms Farazsms
magfa Magfa
ippanel IPPanel
niksms Niksms
mediana Mediana
limosms LimoSMS
avanak Avanak (voice)
amoot Amoot
farapayamak Farapayamak
payamito Payamito
payamaknovin Payamaknovin
bahmanpayam Bahmanpayam
payamresan Payamresan
behinpayam Behinpayam
rastinsms Rastinsms

Messengers

Config Service
telegram Telegram
whatsapp WhatsApp
bale Bale
eitaa Eitaa
rubika Rubika
gap Gap
igap iGap
messenger Facebook Messenger
viber Viber
line LINE
discord Discord
slack Slack

Local

Config Use
array In-memory driver for tests and local work
log Writes to the Laravel log
failover Tries several drivers and moves on when one fails

Per-driver settings live in config/smsapi.php and the wiki.


What it covers

Need Supported
Simple and bulk send Yes
A template id per panel Yes
Failover when a panel errors Yes
Several accounts or lines on one panel Yes
Queues and retries Yes
OTP by email Yes
Issue and check OTP (vault) Optional
Laravel notification channel Yes
Iranian number normalization Yes
Send logs Optional
Delivery status (webhook) Optional
Rate limiter and circuit breaker Optional
HTTP API for sending Optional
Messengers Yes
Sms::fake() in tests Yes

Common settings


HTTP API and webhooks

Both are off until you install them. After that, send the token in a header (X-SMSAPI-Token or X-SMSAPI-Webhook-Token, or Authorization: Bearer). ?token= is ignored unless SMSAPI_API_ALLOW_QUERY_TOKEN / SMSAPI_WEBHOOK_ALLOW_QUERY_TOKEN=true. A webhook with no token is closed (SMSAPI_WEBHOOK_REQUIRE_TOKEN defaults to true). The send route is throttled at 60 requests per minute unless SMSAPI_API_THROTTLE is empty.

Provider API keys and bot tokens are removed from HTTP exception text before it is stored in sms_logs. The send API returns a generic error and does not echo exception text.


Static analysis: vendor/bin/phpstan analyse (Larastan, level 5, with phpstan-baseline.neon).

Docs

Full English notes are also on the GitHub wiki:

https://github.com/alizeinodin/SMSApi/wiki


Changes and license


All versions of smsapi with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
guzzlehttp/guzzle Version ^7.5
illuminate/bus Version ^10.0|^11.0|^12.0|^13.0
illuminate/cache Version ^10.0|^11.0|^12.0|^13.0
illuminate/database Version ^10.0|^11.0|^12.0|^13.0
illuminate/mail Version ^10.0|^11.0|^12.0|^13.0
illuminate/notifications Version ^10.0|^11.0|^12.0|^13.0
illuminate/queue Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^10.0|^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alizne/smsapi contains the following files

Loading the files please wait ...