PHPackages                             cjrasmussen/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. cjrasmussen/slack-api

ActiveLibrary[API Development](/categories/api)

cjrasmussen/slack-api
=====================

Simple helper for interacting with Slack's API

1.1.0(1y ago)01741MITPHPPHP &gt;=7.4.0

Since Sep 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cjrasmussen/SlackApi)[ Packagist](https://packagist.org/packages/cjrasmussen/slack-api)[ Docs](https://cjr.dev)[ RSS](/packages/cjrasmussen-slack-api/feed)WikiDiscussions main Synced 5d ago

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

SlackApi
========

[](#slackapi)

Simple class for making requests to the Slack API or Slack Webhooks. Not affiliated with Slack.

Usage
-----

[](#usage)

```
use cjrasmussen\SlackApi\SlackApi;

// INVITE A USER TO A CHANNEL
$slack = new SlackApi($token);

$args = [
    'channel' => 'C1234567',
    'member' => 'U9876543',
];
$slack->request('POST', 'conversations.invite', $args);

// SEND A MESSAGE VIA A SLACK WEBHOOK
$msg = [
    'text' => 'Message text',
];
$response = (new SlackApi($webhook_url))->sendMessage($msg);
```

More Examples
-------------

[](#more-examples)

More examples, as well as other things I've learned using the Slack API, are [available at my blog](https://cjr.dev/?s=Slack).

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

[](#installation)

Simply add a dependency on cjrasmussen/slack-api to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:

```
composer require cjrasmussen/slack-api
```

Although it's recommended to use Composer, you can actually include the file(s) any way you want.

License
-------

[](#license)

SlackApi is [MIT](http://opensource.org/licenses/MIT) licensed.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Total

5

Last Release

683d ago

PHP version history (2 changes)v1.0PHP &gt;=7.1.0

1.1.0PHP &gt;=7.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0225f44837a665c8a143afa50a34a406a769c523dba31e4cdf73fd0530dede45?d=identicon)[cjrasmussen](/maintainers/cjrasmussen)

---

Top Contributors

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

---

Tags

slack

### Embed Badge

![Health badge](/badges/cjrasmussen-slack-api/health.svg)

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

###  Alternatives

[jolicode/slack-php-api

An up to date PHP client for Slack's API

2534.4M12](/packages/jolicode-slack-php-api)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[botman/driver-slack

Slack driver for BotMan

51267.0k2](/packages/botman-driver-slack)[mpociot/slack-client

A better Slack client, with RTM API support

51263.6k1](/packages/mpociot-slack-client)[lygav/php-slackbot

Simple, easy to use, PHP package for sending messages to Slack. Send pretty, colourful messages with rich attachments quickly with this friendly API

39399.9k](/packages/lygav-php-slackbot)[lisennk/laravel-slack-events-api

Slack Events API for Laravel 5, 6, 7 and 8

3911.4k](/packages/lisennk-laravel-slack-events-api)

PHPackages © 2026

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