PHPackages                             nightmare/jmessage - 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. nightmare/jmessage

ActiveLibrary[API Development](/categories/api)

nightmare/jmessage
==================

基于极光官方，修改一些问题，增加一些功能

1.1.13(7y ago)021MITPHPPHP &gt;=5.4

Since Dec 12Pushed 5y agoCompare

[ Source](https://github.com/CreationLee/jmessage-api-php-client)[ Packagist](https://packagist.org/packages/nightmare/jmessage)[ Docs](https://github.com/jpush/jmessage-api-php-client)[ RSS](/packages/nightmare-jmessage/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (21)Used By (0)

JMessage API PHP Client
=======================

[](#jmessage-api-php-client)

这是 JMessage REST API 的 PHP 版本封装开发包，是由极光推送官方提供的，一般支持最新的 API 功能。

对应的 REST API 文档: [https://docs.jiguang.cn/jmessage/server/rest\_api\_im/](https://docs.jiguang.cn/jmessage/server/rest_api_im/)

> 支持的 PHP 版本: 5.4 ～ 5.6.x, 7

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

[](#installation)

#### 使用 Composer 安装

[](#使用-composer-安装)

- 在项目中的 `composer.json` 文件中添加 jmessage 依赖：

```
"require": {
    "jiguang/jmessage": "~1.1"
}
```

- 执行 `$ php composer.phar install` 或 `$ composer install` 进行安装。

#### 直接下载源码安装

[](#直接下载源码安装)

> 直接下载源代码也是一种安装 SDK 的方法，不过因为有版本更新的维护问题，所以这种安装方式**十分不推荐**，但由于种种原因导致无法使用 Composer，所以我们也提供了这种情况下的备选方案。

- 下载源代码包，解压到项目中
- 在项目中引入 autoload（在源码根目录下）：

```
require 'path_to_sdk/autoload.php';
```

Usage
-----

[](#usage)

- [JMessage Client](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#jmessage-client)
- [证书问题](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#%E8%AF%81%E4%B9%A6%E9%97%AE%E9%A2%98)
- [User 用户](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#user-%E7%94%A8%E6%88%B7)
- [Admin 管理员](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#admin-%E7%AE%A1%E7%90%86%E5%91%98)
- [Blacklist 黑名单](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#blacklist-%E9%BB%91%E5%90%8D%E5%8D%95)
- [Group 群组](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#group-%E7%BE%A4%E7%BB%84)
- [Friend 好友](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#friend-%E5%A5%BD%E5%8F%8B)
- [Resource 媒体资源](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#resource-%E5%AA%92%E4%BD%93%E8%B5%84%E6%BA%90)
- [消息相关](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#%E6%B6%88%E6%81%AF%E7%9B%B8%E5%85%B3)
- [SensitiveWord 敏感词](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#sensitiveword-%E6%95%8F%E6%84%9F%E8%AF%8D)
- [ChatRoom 聊天室](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#chatroom-%E8%81%8A%E5%A4%A9%E5%AE%A4)
- [跨应用](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/CROSS.md#cross-%E8%B7%A8%E5%BA%94%E7%94%A8)
- [Report](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/REPORT.md)

Examples
--------

[](#examples)

**注意: 这只是使用样例, 不应该直接用于实际环境中!!**

在项目的 [examples](https://github.com/jpush/jmessage-api-php-client/tree/master/examples) 文件夹中有简单的使用示例代码, 开发者可以参考其中的样例快速了解该库的使用方法。

**注：所下载的样例代码不可马上使用，需要在** `examples/config.php` **文件中填入相关的必要参数，或者设置相关环境变量，不进行这个操作则示例运行会失败。** 另外为保护开发者隐私 `examples/config.php` 文件不在版本控制中，需要使用如下命令手动复制：

```
$ cp examples/config.php.example examples/config.php
```

**示例简单使用方法**

若要运行 friend\_examples.php 中的示例代码：

```
# 假定当前目录为 JMessage 源码所在的根目录
$ php examples/friend_examples.php
```

> 当然也可编辑相关的示例文件，更改参数查看执行效果

ErrorCode
---------

[](#errorcode)

JMessage 服务器端报的错误码。有可能出现在返回值中，可在这里查询含义： [https://docs.jiguang.cn/jmessage/client/im\_errorcode\_server/](https://docs.jiguang.cn/jmessage/client/im_errorcode_server/)

Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at .

License
-------

[](#license)

The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~83 days

Recently: every ~225 days

Total

19

Last Release

1996d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.3

1.0.1PHP &gt;=5.4

### Community

Maintainers

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

---

Top Contributors

[![CreationLee](https://avatars.githubusercontent.com/u/22748068?v=4)](https://github.com/CreationLee "CreationLee (7 commits)")

---

Tags

api clientjiguangjmessage

### Embed Badge

![Health badge](/badges/nightmare-jmessage/health.svg)

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

###  Alternatives

[jiguang/jmessage

JMessage's officially supported PHP client library for accessing JMessage APIs.

4022.0k](/packages/jiguang-jmessage)[smsapi/php-client

SMSAPI API PHP Client

682.3M19](/packages/smsapi-php-client)[crowdin/crowdin-api-client

PHP client library for Crowdin API v2

621.7M5](/packages/crowdin-crowdin-api-client)[smsapi.pl/php-client

SMSAPI API PHP Client

6582.3k1](/packages/smsapipl-php-client)[inspirum/balikobot

PHP library for Balikobot API

20403.7k4](/packages/inspirum-balikobot)[phplicengine/bitly

Bitly API v4

22305.0k](/packages/phplicengine-bitly)

PHPackages © 2026

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