PHPackages                             hnhdigital-os/php-slack-api - 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. hnhdigital-os/php-slack-api

ActiveLibrary[API Development](/categories/api)

hnhdigital-os/php-slack-api
===========================

Access your Slack Team's API through PHP objects

v0.24.0(5y ago)931.1k6[1 PRs](https://github.com/hnhdigital-os/php-slack-api/pulls)2MITPHPPHP ^7.2

Since Jul 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/hnhdigital-os/php-slack-api)[ Packagist](https://packagist.org/packages/hnhdigital-os/php-slack-api)[ Docs](http://hnhdigital-os.github.io/php-slack-api/)[ RSS](/packages/hnhdigital-os-php-slack-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (9)Versions (53)Used By (2)

```
   _____ _            _
  / ____| |          | |
 | (___ | | __ _  ___| | __
  \___ \| |/ _` |/ __| |/ /
  ____) | | (_| | (__|   <
 |_____/|_|\__,_|\___|_|\_\

```

Access your Slack Team's API through PHP objects.

[![Latest Version](https://camo.githubusercontent.com/d51340331755561172c86abc9f95c753589ca7f3d7935e1ff4a455075a6eea59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f686e686469676974616c2d6f732f7068702d736c61636b2d6170692e7376673f7374796c653d666c61742d737175617265)](https://github.com/hnhdigital-os/php-slack-api/releases)[![Total Downloads](https://camo.githubusercontent.com/d2342f67636865e9228e4b89da7f4dd0ce60557a64bdfa02ba77b3aec1f97617/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686e686469676974616c2d6f732f7068702d736c61636b2d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hnhdigital-os/php-slack-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/hnhdigital-os/php-slack-api/blob/master/LICENSE.md)

This package has been adapted from [cleentfaar/slack](https://github.com/cleentfaar/slack) by H&amp;H|Digital, an Australian botique developer. Visit us at [hnh.digital](http://hnh.digital).

### 1.0.0 release

[](#100-release)

Please note that from the 1.0.0 release this package's namespace (and folder structure) will change from CL\\Slack to HnhDigital\\SlackApi.

From v1.0.0 all the payloads and responses will be matched with the Slack API and missing api methods (listed below) will be completed.

### Documentation

[](#documentation)

- [Getting started](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/getting-started.md) - Before you use this library, you need to generate a token or setup oAuth.
- [Installation](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/installation.md) - Information on installing this library through composer or as a git submodule.
- [Usage](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/usage.md) - A few simple examples on how to access the Slack API using this library
- [API methods](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/methods/index.md) - Detailed information on each of Slack's API methods and how to access them using this library's `Payload` classes.
- [Events](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/events.md) - Examples for listening to events fired by the `ApiClient`

### Features

[](#features)

- Access all of Slack's API methods with dedicated payload classes (see [usage documentation](https://github.com/hnhdigital-os/php-slack-api/blob/master/src/Resources/doc/usage.md))
- Payloads and responses follow the same definitions as described in the [official documentation](https://api.slack.com) (with a few exceptions where I think it would make a better distinction).
- Data between you and Slack is serialized using the [JMS Serializer](http://jmsyst.com/libs/serializer) package, allowing fully spec-ed PHP objects to be used for working with the API.
- Code has been highly abstracted to support re-use in more specific implementations (see [SlackBundle](https://github.com/cleentfaar/CLSlackBundle))

### Unit testing

[](#unit-testing)

Currently unit testing is broken (as per imported repo cleentfaar/slack). This will be updated to the latest version shortly.

Feel free to fix with a PR.

### Up-to-date methods

[](#up-to-date-methods)

The following methods have been reviewed and updated:

- chat.postMessage (Last reviewed: June 23, 2017)
- chat.update (Last reviewed: June 23, 2017)
- oauth.access (Last reviewed: June 21, 2017)
- users.identity (Added: June 25, 2017)

Feel free to review a method and update the README with a PR.

### Missing API methods

[](#missing-api-methods)

The following methods have not been implemented.

Feel free to add a PR.

- auth.revoke
- channels.replies
- chat.meMessage
- chat.unfurl
- dnd.endDnd
- dnd.endSnooze
- dnd.setSnooze
- dnd.teamInfo
- files.comments.add
- files.comments.delete
- files.comments.edit
- files.delete
- files.revokePublicURL
- files.sharedPulbicURL
- im.replies
- mpim.close
- mpim.history
- mpim.list
- mpim.mark
- mpim.open
- mpim.replies
- pins.add
- pins.list
- pins.remove
- reactions.add
- reactions.list
- reactions.remove
- reminders.add
- reminders.complete
- reminders.delete
- reminders.info
- reminders.list
- rtm.connect
- stars.add
- stars.remove
- team.accessLogs
- team.billableInfo
- team.integrationLog
- team.profile.get
- usergroups.create
- usergroups.disable
- usergroups.enable
- usergroups.list
- usergroups.update
- usergroups.users.list
- usergroups.users.update
- users.deletePhoto
- users.setPhoto
- users.profile.get
- users.profile.set

### Methods that need removing

[](#methods-that-need-removing)

The following methods no longer exist in the API:

- users.adminInvite

### Related packages

[](#related-packages)

- [Slack for Laravel](https://github.com/hnhdigital-os/laravel-slack-api) - Laravel integration with this library package.

### FAQ

[](#faq)

###### Why am I getting a cURL 60 error when attempting to connect to the Slack API?

[](#why-am-i-getting-a-curl-60-error-when-attempting-to-connect-to-the-slack-api)

Under the hood this library uses [Guzzle](https://github.com/guzzle/guzzle) to connect to the Slack API, and Guzzle's default method for sending HTTP requests is cURL.

The full error code is *CURLE\_SSL\_CACERT: Peer certificate cannot be authenticated with known CA certificates* and may be due, especially on Windows or OS X, to [Guzzle not being able to find an up to date CA certificate bundle on the operating system](http://docs.guzzlephp.org/en/latest/faq.html#why-am-i-getting-an-ssl-verification-error).

To fix this you first create the Guzzle client manually using an alternative CA cert bundle, or [disabling peer verification](http://guzzle.readthedocs.org/en/latest/clients.html#verify) (not recommended for security reasons), and pass it to the API Client.

```
$client = new \GuzzleHttp\Client();
$client->setDefaultOption('verify', 'C:\Program Files (x86)\Git\bin\curl-ca-bundle.crt');

// continue as normal, using the client above

$apiClient =  new ApiClient('api-token-here', $client);
```

If you get a different error code you can look at the [list of cURL error codes](http://curl.haxx.se/libcurl/c/libcurl-errors.html), or consult the [Guzzle documentation](http://docs.guzzlephp.org/en/latest/) directly.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/hnhdigital-os/php-slack-api/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Cas Leentfaar](https://github.com/cleentfaar)
- [Rocco Howard](https://github.com/therocis)
- [All Contributors](https://github.com/hnhdigital-os/php-slack-api/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/hnhdigital-os/php-slack-api/blob/master/LICENSE) for more information.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~220 days

Total

52

Last Release

1969d ago

Major Versions

0.20.17 → v1.x-dev2017-07-04

PHP version history (4 changes)0.9.4PHP &gt;=5.4

0.17.1PHP &gt;=5.5

0.20.19PHP ^7.1.3

v0.23.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5270e3a3d1add4e39f12dfde3ce549999a26f759d7128056083ab07f475259f2?d=identicon)[bluora](/maintainers/bluora)

---

Top Contributors

[![RoccoHoward](https://avatars.githubusercontent.com/u/227896?v=4)](https://github.com/RoccoHoward "RoccoHoward (39 commits)")[![cleentfaar](https://avatars.githubusercontent.com/u/795661?v=4)](https://github.com/cleentfaar "cleentfaar (33 commits)")[![GenieTim](https://avatars.githubusercontent.com/u/8596965?v=4)](https://github.com/GenieTim "GenieTim (10 commits)")[![agentsib](https://avatars.githubusercontent.com/u/1577055?v=4)](https://github.com/agentsib "agentsib (6 commits)")[![jkudish](https://avatars.githubusercontent.com/u/260253?v=4)](https://github.com/jkudish "jkudish (2 commits)")[![hashnz](https://avatars.githubusercontent.com/u/2280579?v=4)](https://github.com/hashnz "hashnz (2 commits)")[![n1c](https://avatars.githubusercontent.com/u/284075?v=4)](https://github.com/n1c "n1c (2 commits)")[![carsso](https://avatars.githubusercontent.com/u/666182?v=4)](https://github.com/carsso "carsso (2 commits)")[![simonschaufi](https://avatars.githubusercontent.com/u/941794?v=4)](https://github.com/simonschaufi "simonschaufi (2 commits)")[![Zxurian](https://avatars.githubusercontent.com/u/573371?v=4)](https://github.com/Zxurian "Zxurian (1 commits)")[![AlexMac7](https://avatars.githubusercontent.com/u/22553462?v=4)](https://github.com/AlexMac7 "AlexMac7 (1 commits)")[![arendjantetteroo](https://avatars.githubusercontent.com/u/713066?v=4)](https://github.com/arendjantetteroo "arendjantetteroo (1 commits)")[![BallisticPain](https://avatars.githubusercontent.com/u/796026?v=4)](https://github.com/BallisticPain "BallisticPain (1 commits)")[![mathielen](https://avatars.githubusercontent.com/u/1571485?v=4)](https://github.com/mathielen "mathielen (1 commits)")[![NoUseFreak](https://avatars.githubusercontent.com/u/879864?v=4)](https://github.com/NoUseFreak "NoUseFreak (1 commits)")[![salt-lick](https://avatars.githubusercontent.com/u/3297736?v=4)](https://github.com/salt-lick "salt-lick (1 commits)")[![stefanbraspenning](https://avatars.githubusercontent.com/u/5555517?v=4)](https://github.com/stefanbraspenning "stefanbraspenning (1 commits)")[![adrienbrault](https://avatars.githubusercontent.com/u/611271?v=4)](https://github.com/adrienbrault "adrienbrault (1 commits)")

---

Tags

slackchatslack-api

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/hnhdigital-os-php-slack-api/health.svg)

```
[![Health](https://phpackages.com/badges/hnhdigital-os-php-slack-api/health.svg)](https://phpackages.com/packages/hnhdigital-os-php-slack-api)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M923](/packages/statamic-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M396](/packages/drupal-core-recommended)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

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