PHPackages                             leocata/m1-api - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. leocata/m1-api

ActiveLibrary[HTTP &amp; Networking](/categories/http)

leocata/m1-api
==============

PHP API M1

0.0.14(8y ago)0381MITPHPPHP ^7.0

Since Oct 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/RushCode/m1-api)[ Packagist](https://packagist.org/packages/leocata/m1-api)[ RSS](/packages/leocata-m1-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (6)Versions (16)Used By (1)

M1 API
======

[](#m1-api)

[![Build Status](https://camo.githubusercontent.com/189cef156013b38943c7544887b9f16a4a04934871c5541fcff2c92d1d3fa12f/68747470733a2f2f7472617669732d63692e6f72672f52757368436f64652f6d312d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/RushCode/m1-api) [![Code Climate](https://camo.githubusercontent.com/8f0fb3f99a56d5b279e34e408aff610f981f0f297a59fa82f33bc48b1dbbfbd8/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f52757368436f64652f6d312d6170692f6261646765732f6770612e737667)](https://codeclimate.com/github/RushCode/m1-api) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/ce2912d450de856b6409251ed4865131f05ddd90e5bfba239d5cbcb7bea2cf4b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f52757368436f64652f6d312d6170692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/RushCode/m1-api/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/83f05ffb34c7c300c7694e338bc527ada92ad4c77c937850e06166a0dd1921c4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f52757368436f64652f6d312d6170692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/RushCode/m1-api/?branch=master)

### About this class

[](#about-this-class)

This is a PHP7 API implementation for [M1 Messenger](https://play.google.com/store/apps/details?id=smile.m1project)

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

[](#installation)

Add the following to your composer.json:

```
{
  "require": {
    "leocata/m1-api": "^1.0"
  }
}
```

General usage
-------------

[](#general-usage)

### Send request to Server

[](#send-request-to-server)

```
$connect = new Api();
$connect->sendRequest($method);

```

Api methods
-----------

[](#api-methods)

### Session

[](#session)

- getSessions
- getSessionList
- createSession
- updateSession
- closeSession

### Message

[](#message)

- getMessages
- sendMessage
- message
- deleteMessage
- messageDeleted
- messageDelivered
- delivery
- messageTyped

### State

[](#state)

- Set state

```
$state = new \leocata\M1\Methods\Request\SetState();
$state->online();
(new Api())->sendRequest($state);

```

### Contact

[](#contact)

- findContact
- inviteContact
- contactRequested
- contactAccept
- contactAccepted
- contactReject
- contactRejected
- deleteContact
- updateContact
- getContacts

### UserInfo

[](#userinfo)

- getUserInfo
- setUserInfo

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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

Every ~1 days

Total

14

Last Release

3124d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1c0e68c6a6411f136e5a365b8ffcc9e69a723908e02cf030f576859f77dcb40?d=identicon)[leocata](/maintainers/leocata)

---

Top Contributors

[![RushCode](https://avatars.githubusercontent.com/u/1302055?v=4)](https://github.com/RushCode "RushCode (34 commits)")

---

Tags

api-clientmessengerphpwrapper-apiphpapiclientsdkrestcurlrestfulm1

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/leocata-m1-api/health.svg)

```
[![Health](https://phpackages.com/badges/leocata-m1-api/health.svg)](https://phpackages.com/packages/leocata-m1-api)
```

###  Alternatives

[arhitector/yandex

PHP SDK для работы с некоторыми сервисами яндекса (Яндекс.Диск, Yandex.Disk)

13082.9k5](/packages/arhitector-yandex)[ismaeltoe/osms

PHP library wrapper of the Orange SMS API.

4540.0k](/packages/ismaeltoe-osms)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client-php

Documentation for all of Ory Hydra's APIs.

1710.8k](/packages/ory-hydra-client-php)

PHPackages © 2026

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