Download the PHP package envoisms/envoisms-php without Composer

On this page you can find all versions of the php package envoisms/envoisms-php. 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 envoisms-php

EnvoiSMS PHP SDK

Packagist version License: MIT

Official PHP SDK for EnvoiSMS.ma — the direct-operator SMS, WhatsApp Business (WABA) and OTP verification API platform for Morocco (Maroc).

What is EnvoiSMS.ma?

EnvoiSMS.ma routes transactional and marketing messages through direct connections to Morocco's three mobile operators, plus the official WhatsApp Cloud API — no aggregator, no gray SIM routes.

Channel What it's for Covered by this SDK
SMS Direct Opérateurs — IAM, Inwi, Orange OTP codes, delivery alerts, marketing SMS, from 0.48 MAD/SMS ✅ send(), sendBulk()
WhatsApp Business API (Meta WABA) Approved templates, interactive buttons, catalog, multi-agent inbox, from 0.65 MAD/message ✅ send(['channel' => 'whatsapp'])
OTP / 2FA Verification Send + check one-time codes over SMS or WhatsApp ✅ sendOtp(), checkOtp()
Numéro Virtuel (+212) Cloud Moroccan business line, no physical SIM, shared team inbox Manage from the dashboard
Assistant IA Conversationnel Darija/French AI agent for COD order confirmation & support handoff Manage from the dashboard

Numéros Virtuels and the AI assistant are configured from your EnvoiSMS.ma dashboard today; dedicated SDK endpoints for them are on the roadmap. Everything below (send, OTP, billing, webhooks) works with the SDK right now.

Quick Start — Send an SMS

Every send() / sendBulk() carries an Idempotency-Key (generated, or pass one as the second argument), so a retry after a timeout can never bill the same message twice.

Choosing a channel: SMS or WhatsApp?

Default to SMS. It reaches every Moroccan mobile (IAM, Inwi, Orange) with no setup beyond your API key, and it is what an "ordinary text to a customer" needs — even when that customer uses WhatsApp.

'channel' => 'whatsapp' is different in kind, not just in name. It sends from your own WhatsApp Business number, which means:

You want to… Use
Send a text to a customer (order status, reminder, alert) 'channel' => 'sms' (the default — just omit channel)
Send a one-time code sendOtp() — pass 'channel' => 'whatsapp' for a WhatsApp code through our shared sender, no connection needed
Reply on WhatsApp to a customer who wrote to your number in the last 24 h 'channel' => 'whatsapp' with message
Start a WhatsApp conversation (marketing, utility) 'channel' => 'whatsapp' with an approved template

Common mistake: sending an SMS-style text with 'channel' => 'whatsapp' "because the customer is on WhatsApp". Both refusals above name the fix — send it as SMS.

Send a WhatsApp Business Message

Only from a WhatsApp Business number you connected in your dashboard — see the table above. Free text works inside the 24-hour customer window; otherwise send an approved template.

Automatic channel fallback (cascade)

Send over WhatsApp and drop back to SMS automatically when a number is unreachable or has no WhatsApp — the same fallback used for VTC riders on flaky mobile data.

OTP / 2FA Verification

Bulk Sending

Message Status & Delivery

Verifying Delivery Webhooks (DLR)

If you configure a delivery-status webhook, verify its X-EnvoiSMS-Signature header before trusting the payload:

Account & Billing

Analytics & API Keys

Compliance: Opt-outs (STOP)

Error Handling & Retries

The client retries 5xx responses and cURL errors up to maxRetries times (default 2) with exponential backoff, and throws EnvoiSMSError — with statusCode and errorCode properties — on any failure:

Why teams pick EnvoiSMS.ma over an aggregator

See the full breakdown on envoisms.ma.

Documentation & Pricing

Other official SDKs

Support

License

MIT


All versions of envoisms-php with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-curl Version *
ext-json Version *
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 envoisms/envoisms-php contains the following files

Loading the files please wait ...