PHPackages                             stolfam/slack-php - 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. stolfam/slack-php

ActiveLibrary[API Development](/categories/api)

stolfam/slack-php
=================

Easy-to-use PHP classes for Slack integration

5.0.2(1y ago)012MITPHPPHP &gt;= 8.2

Since May 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/stolfam/slack-php)[ Packagist](https://packagist.org/packages/stolfam/slack-php)[ RSS](/packages/stolfam-slack-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Slack PHP
=========

[](#slack-php)

Provides a sending messages to Slack via a bot.

Requirements
------------

[](#requirements)

You have to have a bot. How to do it?

1. Create (or use existing) app via Slack API ()
2. Search for **Features** and **Bot Users**. Then click on the button **Add a Bot User** and fill the form.
3. Now you have to add some permissions (in section OAuth &amp; Permissions) and get **Bot User OAuth Access Token**
4. Install (or reinstall) your app into your Slack workspace

Use
---

[](#use)

```
use \Ataccama\Output\Slack;

$slack = new Slack([
            "token"  => "xoxb-xxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxx", // Bot User OAuth Access Token
            "enable" => true
        ]);

// simple message
$message = new SlackMessage("Test *message* for channel.");

// or using blocks
$message = new SlackMessage();
$message->addBlock( new Section("Some *test* section.") );
$message->addBlock( new Divider() );
$message->addBlock( new Image("Image 1", "https://example.xy/image.jpg", "Image 1 alternative text") );

$channel = new Channel("CXXXXXXXX", "Sandbox")

try {
    $response = $slack->sendMessage($message, $channel);
} catch (SlackException $e) {
    // fatal error
}

if($response) {
    // success
} else {
    // failed
    $error = $slack->lastError;
}

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

724d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a166fb0b766fa1febb53e4dcee9075a1350e7438e623cd7baafbd8e40557fb9?d=identicon)[stolfam](/maintainers/stolfam)

---

Top Contributors

[![stolfam](https://avatars.githubusercontent.com/u/37073073?v=4)](https://github.com/stolfam "stolfam (5 commits)")

### Embed Badge

![Health badge](/badges/stolfam-slack-php/health.svg)

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

###  Alternatives

[apigen/apigen

PHP source code API generator.

2.2k627.9k225](/packages/apigen-apigen)[tomaj/nette-api

Nette api

36261.8k4](/packages/tomaj-nette-api)[allyans3/steam-market-api-v2

Steam Market API v2

1937.3k](/packages/allyans3-steam-market-api-v2)[chapter-three/apple-news-api

Push content to Apple News.

38307.5k3](/packages/chapter-three-apple-news-api)[worksome/graphlint

A static analysis tool for GraphQL

13189.4k](/packages/worksome-graphlint)[infifni/fan-courier-api-client

Fan Courier API Client

1332.6k](/packages/infifni-fan-courier-api-client)

PHPackages © 2026

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