PHPackages                             neleid/chatwork-sdk - 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. neleid/chatwork-sdk

ActiveLibrary

neleid/chatwork-sdk
===================

Just a non-official SDK for Chatwork

0.4.1(7y ago)015GPL-3.0PHPPHP &gt;=7.0

Since Feb 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/neleid/chatwork-sdk)[ Packagist](https://packagist.org/packages/neleid/chatwork-sdk)[ RSS](/packages/neleid-chatwork-sdk/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (15)Used By (0)

Chatwork SDK for PHP
====================

[](#chatwork-sdk-for-php)

##### Remember that this SDK is non-official. It may not work when Chatwork update their APIs in the feature.

[](#remember-that-this-sdk-is-non-official-it-may-not-work-when-chatwork-update-their-apis-in-the-feature)

[![Build Status](https://camo.githubusercontent.com/59aba42c7aa25c5cae31796714a8a391026f223a8f3d1adff6955d3a78b89dbf/68747470733a2f2f7472617669732d63692e6f72672f6e656c6569642f63686174776f726b2d73646b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/neleid/chatwork-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/2f9554747966698f365bd03e7db8af4ab39786f3a0fa7bfe4b014b102d10722b/68747470733a2f2f706f7365722e707567782e6f72672f6e656c6569642f63686174776f726b2d73646b2f762f737461626c65)](https://packagist.org/packages/neleid/chatwork-sdk)[![Total Downloads](https://camo.githubusercontent.com/301fce4aaa2c8776b529c8a41fd320bea5b61771e2e4b7d9c7b98297fbcee66f/68747470733a2f2f706f7365722e707567782e6f72672f6e656c6569642f63686174776f726b2d73646b2f646f776e6c6f616473)](https://packagist.org/packages/neleid/chatwork-sdk)[![Latest Unstable Version](https://camo.githubusercontent.com/d5de79b0b729935198682b70663720a752b056190c780cc786130fa8211740e7/68747470733a2f2f706f7365722e707567782e6f72672f6e656c6569642f63686174776f726b2d73646b2f762f756e737461626c65)](https://packagist.org/packages/neleid/chatwork-sdk)[![License](https://camo.githubusercontent.com/712f06e640cb3c35f805284cf5c0cd2c204e0351722973c491def22ea9f06c26/68747470733a2f2f706f7365722e707567782e6f72672f6e656c6569642f63686174776f726b2d73646b2f6c6963656e7365)](https://packagist.org/packages/neleid/chatwork-sdk)

This project is forked from [wataridori/chatwork-sdk](https://github.com/wataridori/chatwork-sdk) and added some features. If you want to use original repository, you should check [wataridori/chatwork-sdk](https://github.com/wataridori/chatwork-sdk).

This repository is registered to Packagist. So you can use composer to install this repository with 'neleid/chatwork-sdk'.

##### Chatwork SDK supports [Chatwork API version 2](http://help.chatwork.com/hc/ja/articles/115000019401)

[](#chatwork-sdk-supports-chatwork-api-version-2)

##### Check the Chatwork API Document [here](http://developer.chatwork.com/ja/index.html)

[](#check-the-chatwork-api-document-here)

##### English API Document is [here](http://download.chatwork.com/ChatWork_API_Documentation.pdf)

[](#english-api-document-is-here)

Differences with original repository
------------------------------------

[](#differences-with-original-repository)

- Added support for Chatwork API usage limits. You can get API Usage Limits information after successfull API call.
- Added support for Chatwork 'self\_unread' feature. This enables the messages you posted unread. (It means you will be notified with chime.)
- Changed namespace from wataridori to Neleid.
- PHP Requirements is up to 7.0 from 5.4.

Requirement
-----------

[](#requirement)

- PHP &gt;= 7.0
- PHP cURL

Install
-------

[](#install)

You can install and manage Chatwork SDK for PHP by using `Composer`

```
composer require neleid/chatwork-sdk

```

Or add `neleid/chatwork-sdk` into the require section of your `composer.json` file then run `composer update`

Usage
-----

[](#usage)

##### Firstly, to use Chatwork API, you must register an API Key.

[](#firstly-to-use-chatwork-api-you-must-register-an-api-key)

##### Pass your key to `ChatworkSDK` class.

[](#pass-your-key-to-chatworksdk-class)

```
ChatworkSDK::setApiKey($apiKey);
```

If you have problems with the SSL Certificate Verification, you can turn it off by the following setting.

```
// Not recommend. Only do this when you have problems with the request
ChatworkSDK::setSslVerificationMode(false);
```

Now you can easily use many functions to access [Chatwork API Endpoints](http://developer.chatwork.com/ja/endpoints.html).

##### ChatworkSDK's Classes

[](#chatworksdks-classes)

ChatworkAPI: This is the class that contains base API. You can use it to send request to Chatwork and receive the response in array.

```
ChatworkSDK::setApiKey($apiKey);
$api = new ChatworkApi();
// Get user own information
$api->me();

// Get user own statics information
$api->getMyStatus();

// Get user rooms list
$api->getRooms();
```

##### ChatworkSDK also provides many others class that help you to work in more object oriented way.

[](#chatworksdk-also-provides-many-others-class-that-help-you-to-work-in-more-object-oriented-way)

- ChatworkRoom: Use for store Room Information, with many functions to work with Room
- ChatworkUser: Use for store User Information.
- ChatworkMessage: Use for store Message Information.

```
ChatworkSDK::setApiKey($apiKey);
$room = new ChatworkRoom($roomId);
// The following function will return an array of ChatworkUser
$members = $room->getMembers();
foreach ($members as $member) {
    // Print out User Information
    print_r($member->toArray());
}

// Send Message to All Members in the Room
$room->sendMessageToAll('Test Message');

// Send Message to list of members in the room
$room->sendMessageToList([$member_1, $member_2], 'Another Test Message');
```

The 3 classes above are extended from the `ChatworkBase` class. `ChatworkBase` provides you some useful function to work with messages. You can easily build a TO message, REPLY or QUOTE message.

```
ChatworkSDK::setApiKey($apiKey);
$room = new ChatworkRoom($roomId);
$messages = $room->getMessages();
if ($messages & !empty($messages[0])) {
    $lastMessage = $messages[0];
    // Reset Message to null string
    $room->resetMessage();
    // Append the REPLY text to current message
    $room->appendReplyInRoom($lastMessage);
    // Append the QUOTE text to current message
    $room->appendQuote($lastMessage);
    // Append the Information Text to the current message
    $room->appendInfo('Test Quote, Reply, Info text', 'Test from Chatwork-SDK');
    // Send current message into the Room
    $room->sendMessage();
}
```

Run test
--------

[](#run-test)

- Create a file named `config.json` inside the `tests/fixtures/` folder.
- Input your API Key, and a test Room into `config.json` file. It should look like this:

```
{
  "apiKey": "YOUR-API-KEY-HERE",
  "roomId": "YOUR-TEST-ROOM-HERE"
}
```

- Then run `phpunit` to start testing.

Contribution
------------

[](#contribution)

View contribution guidelines [here](./CONTRIBUTING.md)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~107 days

Recently: every ~170 days

Total

14

Last Release

2708d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51ff735017c528f91501c6377b1815488fbc09d87495ef2724b1d956146cfba9?d=identicon)[Neleid](/maintainers/Neleid)

---

Top Contributors

[![wataridori](https://avatars.githubusercontent.com/u/1189893?v=4)](https://github.com/wataridori "wataridori (28 commits)")[![neleid](https://avatars.githubusercontent.com/u/6047680?v=4)](https://github.com/neleid "neleid (4 commits)")

### Embed Badge

![Health badge](/badges/neleid-chatwork-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/neleid-chatwork-sdk/health.svg)](https://phpackages.com/packages/neleid-chatwork-sdk)
```

PHPackages © 2026

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