PHPackages                             bitmoro/bitmorophp - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. bitmoro/bitmorophp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bitmoro/bitmorophp
==================

A SDK Package of Bitmoro for php applications

v1.0.0(1y ago)23MITPHPPHP &gt;=7.4.0

Since Jan 16Pushed 1y agoCompare

[ Source](https://github.com/bitmoro-official/bitmoro-php)[ Packagist](https://packagist.org/packages/bitmoro/bitmorophp)[ RSS](/packages/bitmoro-bitmorophp/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Bitmoro PHP SDK for SMS API
===========================

[](#bitmoro-php-sdk-for-sms-api)

Installation
------------

[](#installation)

Install the package using Composer:

```
composer require bitmoro/bitmorophp
```

Include the autoloader in your project:

```
require __DIR__ . '/vendor/autoload.php';
```

Usage
-----

[](#usage)

### Initialization

[](#initialization)

```
$bitmoro = new Bitmoro("api_token", "defaultSenderId");
```

Get the API token and sender ID from the Bitmoro developer dashboard.

---

### OTP Message

[](#otp-message)

Send a one-time password (OTP) message:

```
$number = "1234567890";
$message = "Test Message";
$response = $bitmoro->sendOTP($number, $message);
```

If you want to change the sender ID:

```
$response = $bitmoro->sendOTP($number, $message, $newSenderId);
```

#### Example of Success Response:

[](#example-of-success-response)

```
{
    "numberOfFailed": 0,
    "messageId": "tqtkIYTQpSAneKYMLJEC"
}
```

#### Example of Error Response:

[](#example-of-error-response)

```
{
    "message": "Cannot send message until the number is verified",
    "errorCode": "01"
}
```

---

### Bulk SMS

[](#bulk-sms)

Send bulk SMS messages:

```
$numbers = ["1234567890"];
$message = "Test Message";
$scheduleDate = time(); // Must be in timestamp
$callbackUrl = "call_back_url";
$response = $bitmoro->sendBulkSms($numbers, $message, $scheduleDate, $callbackUrl);
```

If you want to change the sender ID:

```
$response = $bitmoro->sendBulkSms($numbers, $message, $scheduleDate, $callbackUrl, $newSenderId);
```

#### Request Body

[](#request-body)

FieldTypeValidationRequirednumberarray of stringsAn array of valid phone numbersYesmessagestringThe message contentYessenderIdstringOptional field for sender IDNoscheduledDatenumberValid Unix timestamp in futureNocallbackUrlstringValid URL for message reportNo#### Example Success Response:

[](#example-success-response)

```
{
    "status": "QUEUED",
    "report": [
        {
            "number": "9801234567",
            "message": "Hello",
            "type": 1,
            "credit": 1
        },
        {
            "number": "9823456780",
            "message": "Hello",
            "type": 1,
            "credit": 1
        }
    ],
    "creditSpent": 2,
    "messageId": "s6atNQj8nTuAIxOrEv7w",
    "senderId": "bit_alert"
}
```

#### Example of Error Response:

[](#example-of-error-response-1)

```
{
    "message": "Cannot send message until the number is verified",
    "errorCode": "01"
}
```

---

### Dynamic Message

[](#dynamic-message)

Send dynamic messages:

```
$contacts = [
    [
        "number" => "9842882495",
        "message" => "Hello, this is a test message",
        "city" => "Kathmandu",
        "country" => "Nepal",
        "to" => "9842882495"
    ],
    [
        "number" => "9869352017",
        "message" => "Hello, this is a test message",
        "city" => "Kathmandu",
        "country" => "Nepal",
        "to" => "9869352017"
    ]
];

$message = "${message} from ${country} to ${number} in ${city} ${to}";
$response = $bitmoro->sendDynamicSms($contacts, $message, $scheduleDate, $callbackUrl, $newSenderId);
```

#### Request Body

[](#request-body-1)

FieldTypeDescriptionRequiredcontactsarray of objectsEach contact object contains a number field and additional dynamic fields.Yescontacts.numberstringThe phone number of the contact.YesmessagestringMessage body with placeholders `${key}` replaced by values from the contact object.YessenderIdstringThe sender ID for the message.NoscheduledDatenumberValid Unix timestamp in future.NocallbackUrlstringValid URL to receive message report.NodefaultValuesobjectDefault key-value pairs for missing placeholders in dynamic messages.No#### Example Success Response:

[](#example-success-response-1)

```
{
    "status": "SCHEDULED",
    "report": [
        {
            "number": "9809876543",
            "message": "Hello joe. I am from Biratnagar",
            "type": 1,
            "credit": 1
        },
        {
            "number": "9800000000",
            "message": "Hello ramu. I am from Biratnagar",
            "type": 1,
            "credit": 1
        },
        {
            "number": "9876543210",
            "message": "Hello ramu. I am from kathmandu",
            "type": 1,
            "credit": 1
        }
    ],
    "creditSpent": 3,
    "messageId": "Fx2z80UJIm3BdlUrtb7I",
    "senderId": "bit_alert"
}
```

#### Example of Error Response:

[](#example-of-error-response-2)

```
{
    "message": "Cannot send message until the number is verified",
    "errorCode": "01"
}
```

Future Updates - ReadMe
=======================

[](#future-updates---readme)

Overview
--------

[](#overview)

This document outlines the future updates planned for the project. The updates include features related to **Reporting** and **Callback URL** integration. These enhancements aim to improve functionality, security, and user experience.

Features
--------

[](#features)

### 1. Reporting

[](#1-reporting)

- **Goal:** Provide comprehensive reporting tools.
- **Details:**
    - Develop detailed reporting features for better insights.
    - Include data visualization options such as charts and graphs.
    - Add functionality to export reports in various formats (PDF, Excel).
- **Priority:** High

### 2. Callback URL

[](#2-callback-url)

- **Goal:** Enhance system communication via callback URLs.
- **Details:**
    - Design and test callback URL integration to ensure seamless data exchange.
    - Implement secure communication mechanisms, such as OAuth or token-based authentication.
    - Include logging and error handling to manage callback responses effectively.
- **Priority:** Medium

Contribution Guidelines
-----------------------

[](#contribution-guidelines)

- Fork the repository and create a feature branch for any new additions.
- Submit a pull request with a detailed description of the updates.
- Ensure all tests pass before submission.

License
-------

[](#license)

This project is licensed under the MIT License. See the LICENSE file for details.

---

Feel free to update this file as new features or changes are introduced.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance41

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aaad1e78a07f047f9ed0773fb6cd756671af01144500809c354493d7d1f234ea?d=identicon)[bipin.code](/maintainers/bipin.code)

---

Top Contributors

[![regmibipin13](https://avatars.githubusercontent.com/u/48682506?v=4)](https://github.com/regmibipin13 "regmibipin13 (12 commits)")

### Embed Badge

![Health badge](/badges/bitmoro-bitmorophp/health.svg)

```
[![Health](https://phpackages.com/badges/bitmoro-bitmorophp/health.svg)](https://phpackages.com/packages/bitmoro-bitmorophp)
```

###  Alternatives

[hanson/rainbow

4710.4k](/packages/hanson-rainbow)

PHPackages © 2026

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