PHPackages                             wataridori/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. [API Development](/categories/api)
4. /
5. wataridori/chatwork-sdk

ActiveLibrary[API Development](/categories/api)

wataridori/chatwork-sdk
=======================

Just a non-official SDK for Chatwork

0.4.0(4y ago)1984.6k—0%101GPL-3.0PHP

Since Feb 16Pushed 4y ago2 watchersCompare

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

READMEChangelog (2)DependenciesVersions (15)Used By (1)

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

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

##### [API Docs](http://wataridori.github.io/chatwork-sdk/api/index.html)

[](#api-docs)

##### 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)

##### (However, I will try to cover all the changes from Chatwork. If something goes wrong, please let me know)

[](#however-i-will-try-to-cover-all-the-changes-from-chatwork-if-something-goes-wrong-please-let-me-know)

[![StyleCI](https://camo.githubusercontent.com/7a800ec048074a456ef84996a960b97b3e080c01f66c13b93a616588fbab2d56/68747470733a2f2f7374796c6563692e696f2f7265706f732f32383739393130352f736869656c64)](https://styleci.io/repos/28799105)[![Build Status](https://camo.githubusercontent.com/c3c5309ed709cb84a847722cfac57e835d1bf1cc0c8789abd62dd2c6828afbc3/68747470733a2f2f7472617669732d63692e6f72672f776174617269646f72692f63686174776f726b2d73646b2e737667)](https://travis-ci.org/wataridori/chatwork-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/ea86b6aa644767ccbc4f7435e51153e37f677248c04645ed9bfb1a519a139467/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f63686174776f726b2d73646b2f762f737461626c652e737667)](https://packagist.org/packages/wataridori/chatwork-sdk)[![Total Downloads](https://camo.githubusercontent.com/58321df6ebde71ea19a9dbe93bc86b7911e413ffb4c8d1b2d1f3e62ab1432181/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f63686174776f726b2d73646b2f646f776e6c6f616473)](https://packagist.org/packages/wataridori/chatwork-sdk)[![Latest Unstable Version](https://camo.githubusercontent.com/54fa5dd6b95a255a15489cf78cdfca76f4c10f28aa19a12c5e8e8ebb858929f6/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f63686174776f726b2d73646b2f762f756e737461626c652e737667)](https://packagist.org/packages/wataridori/chatwork-sdk)[![License](https://camo.githubusercontent.com/02f9a63449162d51cfb6240b8706c3e4dd4585316db90e9e1bd93e89eb426702/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f63686174776f726b2d73646b2f6c6963656e73652e737667)](https://packagist.org/packages/wataridori/chatwork-sdk)

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

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

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

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

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

[](#requirement)

- PHP &gt;= 5.4
- PHP cURL

Install
-------

[](#install)

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

```
composer require wataridori/chatwork-sdk

```

Or add `wataridori/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();
}
```

##### Check ChatworkSDK functions list [here](http://wataridori.github.io/chatwork-sdk/api/class-wataridori.ChatworkSDK.ChatworkApi.html) for further details and usages.

[](#check-chatworksdk-functions-list-here-for-further-details-and-usages)

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

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity61

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

Recently: every ~401 days

Total

14

Last Release

1780d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/134a69054257dfdda1ccde099a44209654a12800b97c459b1ef4e9c3a90fe3c1?d=identicon)[wataridori](/maintainers/wataridori)

---

Top Contributors

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

---

Tags

chatworkchatwork-apichatwork-sdkphp

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M453](/packages/google-gax)

PHPackages © 2026

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