{"id":20732383,"url":"https://github.com/jpush/jmessage-api-php-client","last_synced_at":"2026-03-15T10:33:11.878Z","repository":{"id":32406552,"uuid":"35983348","full_name":"jpush/jmessage-api-php-client","owner":"jpush","description":"JMessage's officially supported PHP client library for accessing JMessage APIs. 极光IM官方支持的 PHP 版本服务器端 SDK。","archived":false,"fork":false,"pushed_at":"2018-12-11T02:08:19.000Z","size":109,"stargazers_count":40,"open_issues_count":0,"forks_count":21,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-23T22:07:00.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.jiguang.cn","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-21T01:21:40.000Z","updated_at":"2024-03-14T08:28:03.000Z","dependencies_parsed_at":"2022-09-11T03:40:55.384Z","dependency_job_id":null,"html_url":"https://github.com/jpush/jmessage-api-php-client","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmessage-api-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmessage-api-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmessage-api-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpush%2Fjmessage-api-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpush","download_url":"https://codeload.github.com/jpush/jmessage-api-php-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522299,"owners_count":21444511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T05:19:09.363Z","updated_at":"2025-10-07T14:46:53.795Z","avatar_url":"https://github.com/jpush.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JMessage API PHP Client\n\n这是 JMessage REST API 的 PHP 版本封装开发包，是由极光推送官方提供的，一般支持最新的 API 功能。\n\n对应的 REST API 文档: https://docs.jiguang.cn/jmessage/server/rest_api_im/\n\n\u003e 支持的 PHP 版本: 5.4 ～ 5.6.x, 7\n\n## Installation\n\n#### 使用 Composer 安装\n\n- 在项目中的 `composer.json` 文件中添加 jmessage 依赖：\n\n```json\n\"require\": {\n    \"jiguang/jmessage\": \"~1.1\"\n}\n```\n\n- 执行 `$ php composer.phar install` 或 `$ composer install` 进行安装。\n\n#### 直接下载源码安装\n\n\u003e 直接下载源代码也是一种安装 SDK 的方法，不过因为有版本更新的维护问题，所以这种安装方式**十分不推荐**，但由于种种原因导致无法使用 Composer，所以我们也提供了这种情况下的备选方案。\n\n- 下载源代码包，解压到项目中\n- 在项目中引入 autoload（在源码根目录下）：\n\n```php\nrequire 'path_to_sdk/autoload.php';\n```\n\n## Usage\n\n* [JMessage Client](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#jmessage-client)\n* [证书问题](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#证书问题)\n* [User 用户](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#user-用户)\n* [Admin 管理员](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#admin-管理员)\n* [Blacklist 黑名单](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#blacklist-黑名单)\n* [Group 群组](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#group-群组)\n* [Friend 好友](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#friend-好友)\n* [Resource 媒体资源](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#resource-媒体资源)\n* [消息相关](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#消息相关)\n* [SensitiveWord 敏感词](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#sensitiveword-敏感词)\n* [ChatRoom 聊天室](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/GUIDE.md#chatroom-聊天室)\n* [跨应用](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/CROSS.md#cross-跨应用)\n* [Report](https://github.com/jpush/jmessage-api-php-client/blob/master/docs/REPORT.md)\n\n## Examples\n\n**注意: 这只是使用样例, 不应该直接用于实际环境中!!**\n\n在项目的 [examples](https://github.com/jpush/jmessage-api-php-client/tree/master/examples) 文件夹中有简单的使用示例代码, 开发者可以参考其中的样例快速了解该库的使用方法。\n\n**注：所下载的样例代码不可马上使用，需要在** `examples/config.php` **文件中填入相关的必要参数，或者设置相关环境变量，不进行这个操作则示例运行会失败。** 另外为保护开发者隐私 `examples/config.php` 文件不在版本控制中，需要使用如下命令手动复制：\n\n```php\n$ cp examples/config.php.example examples/config.php\n```\n\n**示例简单使用方法**\n\n若要运行 friend_examples.php 中的示例代码：\n\n```bash\n# 假定当前目录为 JMessage 源码所在的根目录\n$ php examples/friend_examples.php\n```\n\u003e 当然也可编辑相关的示例文件，更改参数查看执行效果\n\n## ErrorCode\n\nJMessage 服务器端报的错误码。有可能出现在返回值中，可在这里查询含义： https://docs.jiguang.cn/jmessage/client/im_errorcode_server/\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/jpush/jmessage-api-php-client.\n\n## License\n\nThe library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmessage-api-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpush%2Fjmessage-api-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpush%2Fjmessage-api-php-client/lists"}