PHPackages                             saralsms/sdk-for-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. saralsms/sdk-for-php

ActiveLibrary[API Development](/categories/api)

saralsms/sdk-for-php
====================

SaralSMS SDK for the PHP programming language.

2.0.4(5y ago)11.4kMITPHPPHP ^7.2.5

Since Apr 5Pushed 5y agoCompare

[ Source](https://github.com/saralsms/sdk-for-php)[ Packagist](https://packagist.org/packages/saralsms/sdk-for-php)[ Docs](https://saralsms.com)[ RSS](/packages/saralsms-sdk-for-php/feed)WikiDiscussions main Synced today

READMEChangelog (8)Dependencies (4)Versions (10)Used By (0)

SaralSMS SDK for PHP
====================

[](#saralsms-sdk-for-php)

The **SaralSMS SDK for PHP** makes it easy for developers to access SaralSMS API service in their PHP code, and build robust SMS based applications and software.

Getting Started
===============

[](#getting-started)

1. **Sign up for SaralSMS** – Before you begin, you need to sign up for an SaralSMS account and retrieve your [Credentials](https://app.saralsms.com).
2. **Minimum requirements** – To run the SDK, your system will need to meet the minimum requirements, including having **PHP &gt;= 7.2**. We highly recommend having it compiled with the cURL extension and cURL compiled with a TLS backend (e.g., NSS or OpenSSL).

Installation
============

[](#installation)

**Install the SDK** – Using [Composer](http://getcomposer.org) is the recommended way to install the SaralSMS SDK for PHP. The SDK is available via [Packagist](http://packagist.org) under the [`saralsms/sdk-for-php`](https://packagist.org/packages/saralsms/sdk-for-php) package.

```
composer require saralsms/sdk-for-php

```

Getting Help
------------

[](#getting-help)

We use the GitHub issues for tracking bugs and feature requests and address them as quickly as possible.

- Call/Email [SaralSMS Support](https://saralsms.com/#contact) or open ticket in your dashboard.
- If it turns out that you may have found a bug, please [open an issue](https://github.com/saralsms/sdk-for-php/issues/new).

Quick Examples
--------------

[](#quick-examples)

### Create a SaralSMS client

[](#create-a-saralsms-client)

```
// require the composer autoloader.
require 'vendor/autoload.php';

use SaralSMS\Client;

// instantiate a SaralSMS client.
$client = new Client('f9c6......55c1');
```

### Send Message

[](#send-message)

This will send the message to one or multiple numbers in an array.

```
$client->send(['9851xxx123', '9801xxx456'], 'This is test message from API.');
```

Sample Response

```
{
    "message": "2 messages queued for delivery."
}
```

### Credits

[](#credits)

This will return the available credits and total messages sent.

```
$client->getCredits();
```

Sample Response

```
{
  "credits": 6584,
  "total_sent": 3416
}
```

### Reports

[](#reports)

This will return historical messages reports including networks, charges and status.

```
$pageNumber = 1;
$client->getReports($pageNumber);
```

Sample Response

```
{
  "pages": 126,
  "data": [
    {
      "id": 56480058,
      "receiver": "9779851xxx123",
      "network": "ntc",
      "message": "Fruits are an excellent source of essential vitamins and minerals.",
      "api_credit": "1",
      "delivery_at": "2020-07-09 01:45:09"
    },
    {
      "id": 56480057,
      "receiver": "9779801xxx456",
      "network": "ncell",
      "message": "Vegetables are important sources of many nutrients, including potassium, dietary fiber.",
      "api_credit": "1",
      "delivery_at": "2020-07-08 07:25:31"
    }
  ]
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~18 days

Recently: every ~29 days

Total

8

Last Release

2100d ago

Major Versions

1.0.4 → 2.0.12020-08-10

PHP version history (4 changes)1.0.1PHP &gt;=5.3.2

1.0.4PHP &gt;=5.4

2.0.1PHP &gt;=7.2

2.0.3PHP ^7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/783d09f6c6a460105752e12c55b5b024468eff7ff82423bb42150301b7fc2251?d=identicon)[sapkotamadan](/maintainers/sapkotamadan)

---

Top Contributors

[![remotemerge](https://avatars.githubusercontent.com/u/4655731?v=4)](https://github.com/remotemerge "remotemerge (147 commits)")[![sapkotamadan](https://avatars.githubusercontent.com/u/7168058?v=4)](https://github.com/sapkotamadan "sapkotamadan (1 commits)")

---

Tags

phpsaralsmssaralsms-sdksms-apisms-clientsms-gatewaysms-sdksms-servicesms-verificationapiclientsdksmsservicegatewayverificationsaralsms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saralsms-sdk-for-php/health.svg)

```
[![Health](https://phpackages.com/badges/saralsms-sdk-for-php/health.svg)](https://phpackages.com/packages/saralsms-sdk-for-php)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[kunalvarma05/dropbox-php-sdk

Dropbox PHP API V2 SDK (Unofficial)

3633.0M18](/packages/kunalvarma05-dropbox-php-sdk)[resend/resend-php

Resend PHP library.

564.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

611.5M5](/packages/crowdin-crowdin-api-client)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
