PHPackages                             jasonwwl/easemob - 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. jasonwwl/easemob

ActiveLibrary[API Development](/categories/api)

jasonwwl/easemob
================

Easemob RESTFUL API SDK

1.0.0(11y ago)102093MITPHPPHP &gt;=5.4.0

Since Oct 20Pushed 11y agoCompare

[ Source](https://github.com/jasonwwl/easemob)[ Packagist](https://packagist.org/packages/jasonwwl/easemob)[ RSS](/packages/jasonwwl-easemob/feed)WikiDiscussions master Synced 4w ago

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

环信 REST API SDK!
================

[](#环信-rest-api-sdk)

部分接口未实现,只做了目前项目上用到的接口，有时间把所有接口全部做出来。

欢迎大家帮我把剩下的接口补充起来。

\##Composer 本项目支持Composer安装

```
$ composer require jasonwwl/easemob

```

\##快速使用 本项目依赖 [php-curl-class/php-curl-class](https://github.com/php-curl-class/php-curl-class)

注意`easemob/storage`目录要可写，因为需要保存token信息

```
require 'Curl.php';
require 'Easemob.php';

$easemob = new Easemob(array(
  'client_id' => '环信client_id',
  'client_secret' => '环信client_secret',
  'org_name' => 'org_name',
  'app_name' => 'app_name'
));
```

\###创建新用户\[授权模式\]

```
$easemob->userAuthorizedRegister('username','password');
```

\###查看用户是否在线

```
$easemob->userOnline('username');
```

\###向群组中加一个人

```
$easemob->groupAddUser('group_id','username');
```

\###删除一个用户

```
$easemob->userDelete('username');
```

\###给指定的群/用户发送消息

考虑到环信的webim目前不支持REST过来的消息读取扩展字段`ext`，所以下方options数组中可设置mixed键，为`true`时 `ext`的内容会被格式化成`JSON`字符串并放入消息内容中。

群`group_id` 或 用户`username` 可为单个`String` 也可为多个 `一维数组`

群：

```
$easemob->sendToGroups('group_id','from who?',array(
    'mixed' => true,
    'ext' => array(
        'a' => 'aa',
        'b' => 'bb'
    )
));
```

用户：

```
$easemob->sendToUsers('username','from who?',array(
    'mixed' => true,
    'ext' => array(
        'a' => 'aa',
        'b' => 'bb'
    )
));
```

目前就实现了这些，其余接口欢迎大家增加。

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4219d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50d3d8e9d11b3136a478a02a10dc2f74b90362004e28061122967b0954cafdb2?d=identicon)[jasonwx](/maintainers/jasonwx)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/jasonwwl-easemob/health.svg)

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

###  Alternatives

[allyans3/steam-market-api-v2

Steam Market API v2

1937.3k](/packages/allyans3-steam-market-api-v2)[chapter-three/apple-news-api

Push content to Apple News.

38307.5k2](/packages/chapter-three-apple-news-api)[saleh7/proxmox-ve_php_api

ProxmoxVE PHP API

11718.7k](/packages/saleh7-proxmox-ve-php-api)[yunchuang/appstore-connect-api

sdk for appstore connect api

3865.3k](/packages/yunchuang-appstore-connect-api)[infifni/fan-courier-api-client

Fan Courier API Client

1332.6k](/packages/infifni-fan-courier-api-client)

PHPackages © 2026

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