PHPackages                             osiomagency/osiosms-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. osiomagency/osiosms-php

ActiveLibrary[API Development](/categories/api)

osiomagency/osiosms-php
=======================

Package PHP pour interagir avec l'API de OsioSMS.

1.0(1y ago)011MITPHPPHP &gt;=7.4

Since Aug 12Pushed 1y agoCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

OsioSMS PHP Package
===================

[](#osiosms-php-package)

### Description

[](#description)

The OsioSMS API PHP Package is a comprehensive library designed to facilitate interaction with the OsioSMS platform. This package enables developers to seamlessly integrate various OsioSMS services into their PHP applications, including contact management, SMS sending, voice messaging, MMS, WhatsApp messaging, Viber, OTP, and profile management. Whether you're managing contacts, sending messages, or checking your account balance, this package provides a unified and easy-to-use interface for all your OsioSMS API needs.

Table of Contents
-----------------

[](#table-of-contents)

- [Contacts](#contacts)
- [Groups](#groups)
- [SMS](#sms)
- [MMS](#mms)
- [Voice](#voice)
- [WhatsApp](#whatsapp)
- [Viber](#viber)
- [OTP](#otp)
- [Profile](#profile)

### Basic Usage

[](#basic-usage)

#### Installation

[](#installation)

Install the package via Composer:

```
composer require yourname/osiosms-contacts
```

#### Initialization

[](#initialization)

To start using the Contacts API, initialize the Contacts class by providing your OsioSMS API token:

```
use OsioSms\OsioSms;

$osiosms = new OsioSms('your_api_token');
```

Here's the `## Contacts` section in markdown format:

Contacts
--------

[](#contacts)

The `Contacts` class provides methods to manage contacts within the OsioSMS platform. You can create, view, update, delete, and list contacts in specific contact groups.

### Create a Contact

[](#create-a-contact)

To create a new contact within a specific group, use the `create` method:

```
$response = $osiosms->contacts()->create('group_id', '31612345678', [
    'FIRST_NAME' => 'John',
    'LAST_NAME' => 'Doe',
]);

print_r($response);
```

### View a Contact

[](#view-a-contact)

To view the details of an existing contact, use the `view` method:

```
$response = $osiosms->contacts()->view('group_id', 'contact_uid');

print_r($response);
```

### Update a Contact

[](#update-a-contact)

To update an existing contact, use the `update` method:

```
$response = $osiosms->contacts()->update('group_id', 'contact_uid', '31612345678', [
    'FIRST_NAME' => 'Jane',
    'LAST_NAME' => 'Doe',
]);

print_r($response);
```

### Delete a Contact

[](#delete-a-contact)

To delete an existing contact, use the `delete` method:

```
$response = $osiosms->contacts()->delete('group_id', 'contact_uid');

print_r($response);
```

### View All Contacts in a Group

[](#view-all-contacts-in-a-group)

To view all contacts within a specific group, use the `viewAll` method:

```
$response = $osiosms->contacts()->viewAll('group_id');

print_r($response);
```

Groups
------

[](#groups)

The `Groups` class provides methods to manage contact groups within the OsioSMS platform. You can create, view, update, delete, and list contact groups.

### Create a Group

[](#create-a-group)

To create a new contact group, use the `create` method:

```
$response = $osiosms->groups()->create('Group Name');

print_r($response);
```

### View a Group

[](#view-a-group)

To view the details of an existing contact group, use the `view` method:

```
$response = $osiosms->groups()->view('group_id');

print_r($response);
```

### Update a Group

[](#update-a-group)

To update the name of an existing contact group, use the `update` method:

```
$response = $osiosms->groups()->update('group_id', 'New Group Name');

print_r($response);
```

### Delete a Group

[](#delete-a-group)

To delete an existing contact group, use the `delete` method:

```
$response = $osiosms->groups()->delete('group_id');

print_r($response);
```

### View All Groups

[](#view-all-groups)

To view all contact groups, use the `viewAll` method:

```
$response = $osiosms->groups()->viewAll();

print_r($response);
```

MMS
---

[](#mms)

The `Mms` class provides methods to send and manage MMS messages using the OsioSMS platform. You can send MMS messages, view details of a specific MMS, and list all MMS messages.

### Send an MMS

[](#send-an-mms)

To send an MMS message, use the `send` method:

```
$response = $osiosms->mms()->send(
    '+33612345678', // Recipient's phone number
    'YourName',    // Sender ID
    'https://example.com/150.jpg', // URL of the media to be sent
    'This is a test MMS message', // Optional message body
    '2021-12-20 07:00' // Optional scheduled time in RFC3339 format
);

print_r($response);
```

### View an MMS

[](#view-an-mms)

To view the details of a specific MMS message, use the `view` method:

```
$response = $osiosms->mms()->view('mms_uid');

print_r($response);
```

### View All MMS Messages

[](#view-all-mms-messages)

To view all MMS messages, use the `viewAll` method:

```
$response = $osiosms->mms()->viewAll();

print_r($response);
```

SMS
---

[](#sms)

The `Sms` class provides methods to send and manage SMS messages using the OsioSMS platform. You can send individual SMS messages, run SMS campaigns, and view details of specific SMS messages or campaigns.

### Send an SMS

[](#send-an-sms)

To send an SMS message, use the `send` method:

```
$response = $osiosms->sms()->send(
    '+33612345678',  // Recipient's phone number
    'YourName',     // Sender ID
    'plain',        // Message type (e.g., 'plain' for regular SMS)
    'This is a test SMS message', // Message body
    '2021-12-20 07:00', // Optional scheduled time in RFC3339 format
    'dlt_template_id'   // Optional DLT template ID
);

print_r($response);
```

### Send an SMS Campaign

[](#send-an-sms-campaign)

To send an SMS campaign to a contact list, use the `sendCampaign` method:

```
$response = $osiosms->sms()->sendCampaign(
    'contact_list_id', // ID of the contact list
    'YourName',        // Sender ID
    'plain',           // Message type (e.g., 'plain' for regular SMS)
    'This is a campaign SMS message', // Message body
    '2021-12-20 07:00', // Optional scheduled time in RFC3339 format
    'dlt_template_id'   // Optional DLT template ID
);

print_r($response);
```

### View an SMS

[](#view-an-sms)

To view the details of a specific SMS message, use the `view` method:

```
$response = $osiosms->sms()->view('sms_uid');

print_r($response);
```

### View All SMS Messages

[](#view-all-sms-messages)

To view all SMS messages, use the `viewAll` method:

```
$response = $osiosms->sms()->viewAll();

print_r($response);
```

### View an SMS Campaign

[](#view-an-sms-campaign)

To view the details of a specific SMS campaign, use the `viewCampaign` method:

```
$response = $osiosms->sms()->viewCampaign('campaign_uid');

print_r($response);
```

Voice
-----

[](#voice)

The `Voice` class provides methods to send and manage voice messages using the OsioSMS platform. You can send voice messages, view details of a specific voice message, and list all voice messages.

### Send a Voice Message

[](#send-a-voice-message)

To send a voice message, use the `send` method:

```
$response = $osiosms->voice()->send(
    '+33612345678',  // Recipient's phone number
    'YourName',     // Sender ID
    'en-gb',        // Language code (e.g., 'en-gb' for British English)
    'female',       // Gender ('male' or 'female')
    'This is a test voice message', // Message to be spoken
    '2021-12-20 07:00' // Optional scheduled time in RFC3339 format
);

print_r($response);
```

### View a Voice Message

[](#view-a-voice-message)

To view the details of a specific voice message, use the `view` method:

```
$response = $osiosms->voice()->view('voice_uid');

print_r($response);
```

### View All Voice Messages

[](#view-all-voice-messages)

To view all voice messages, use the `viewAll` method:

```
$response = $osiosms->voice()->viewAll();

print_r($response);
```

OTP
---

[](#otp)

The `Otp` class provides methods to send and manage One-Time Password (OTP) messages using the OsioSMS platform. You can send OTP messages, view details of a specific OTP message, and list all OTP messages.

### Send an OTP Message

[](#send-an-otp-message)

To send an OTP message, use the `send` method:

```
$response = $osiosms->otp()->send(
    '31612345678',  // Recipient's phone number
    'YourName',     // Sender ID
    'Your OTP code is 123456', // OTP message content
    '2021-12-20 07:00' // Optional scheduled time in RFC3339 format
);

print_r($response);
```

### View an OTP Message

[](#view-an-otp-message)

To view the details of a specific OTP message, use the `view` method:

```
$response = $osiosms->otp()->view('otp_uid');

print_r($response);
```

### View All OTP Messages

[](#view-all-otp-messages)

To view all OTP messages, use the `viewAll` method:

```
$response = $osiosms->otp()->viewAll();

print_r($response);
```

WhatsApp
--------

[](#whatsapp)

The `Whatsapp` class provides methods to send and manage WhatsApp messages using the OsioSMS platform. You can send WhatsApp messages, view details of a specific WhatsApp message, and list all WhatsApp messages.

### Send a WhatsApp Message

[](#send-a-whatsapp-message)

To send a WhatsApp message, use the `send` method:

```
$response = $osiosms->whatsapp()->send(
    '+33612345678',  // Recipient's phone number
    'YourName',     // Sender ID
    'This is a test WhatsApp message', // Message content
    'https://example.com/150.jpg', // Optional media URL for attachment
    '2021-12-20 07:00' // Optional scheduled time in RFC3339 format
);

print_r($response);
```

### View a WhatsApp Message

[](#view-a-whatsapp-message)

To view the details of a specific WhatsApp message, use the `view` method:

```
$response = $osiosms->whatsapp()->view('whatsapp_uid');

print_r($response);
```

### View All WhatsApp Messages

[](#view-all-whatsapp-messages)

To view all WhatsApp messages, use the `viewAll` method:

```
$response = $osiosms->whatsapp()->viewAll();

print_r($response);
```

Viber
-----

[](#viber)

The `ViberApi` class provides methods to send and manage Viber messages using the OsioSMS platform. You can send Viber messages, view details of a specific Viber message, and list all Viber messages.

### Send a Viber Message

[](#send-a-viber-message)

To send a Viber message, use the `send` method:

```
$response = $osiosms->viber()->send(
    '+33612345678',  // Recipient's phone number
    'YourName',     // Sender ID
    'This is a test Viber message', // Message content
    'https://via.placeholder.com/150.jpg', // Optional media URL for attachment
    '2021-12-20 07:00' // Optional scheduled time in RFC3339 format
);

print_r($response);
```

### View a Viber Message

[](#view-a-viber-message)

To view the details of a specific Viber message, use the `view` method:

```
$response = $osiosms->viber()->view('viber_uid');

print_r($response);
```

### View All Viber Messages

[](#view-all-viber-messages)

To view all Viber messages, use the `viewAll` method:

```
$response = $osiosms->viber()->viewAll();

print_r($response);
```

Profile
-------

[](#profile)

The `Profile` class provides methods to retrieve account information, including your remaining SMS balance and profile details, using the OsioSMS platform.

### View SMS Balance

[](#view-sms-balance)

To check your remaining SMS balance, use the `viewBalance` method:

```
$response = $osiosms->profile()->viewBalance();

print_r($response);
```

### View Profile Information

[](#view-profile-information)

To view your profile details, use the `viewProfile` method:

```
$response = $osiosms->profile()->viewProfile();

print_r($response);
```

### Response Handling

[](#response-handling)

All methods return an array with the response data from the OsioSMS API. If the request is successful, the `status` will be `success` and `data` will contain the contact details or relevant information. In case of an error, the `status` will be `error` and the `message` will provide a human-readable description of the error.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity5

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

637d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/314f423bd633d4188e954f14562fff5c64cbb420ab511d5f10b1adacc26dd43d?d=identicon)[nicolasbaud](/maintainers/nicolasbaud)

---

Top Contributors

[![nicolasbaud](https://avatars.githubusercontent.com/u/63586531?v=4)](https://github.com/nicolasbaud "nicolasbaud (25 commits)")

### Embed Badge

![Health badge](/badges/osiomagency-osiosms-php/health.svg)

```
[![Health](https://phpackages.com/badges/osiomagency-osiosms-php/health.svg)](https://phpackages.com/packages/osiomagency-osiosms-php)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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