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

ActiveLibrary[API Development](/categories/api)

dmanetwork/slack
================

An interface for interacting with Slack (slack.com). Their entire API is not yet implemented here, so far just sending messages to channels.

v2.0.0(10y ago)01.3kBSD-2-ClausePHPPHP &gt;=5.4.0

Since Mar 9Pushed 10y agoCompare

[ Source](https://github.com/dmanetwork/slack)[ Packagist](https://packagist.org/packages/dmanetwork/slack)[ RSS](/packages/dmanetwork-slack/feed)WikiDiscussions master Synced 1w ago

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

dmanetwork/slack
================

[](#dmanetworkslack)

Small connection to Slack (slack.com) for sending messages to channels via their API.

Install
-------

[](#install)

Use Composer.

Simple Usage
------------

[](#simple-usage)

Define your Slack options early on with the rest of your application configuration. The only option you MUST specify is the API access token, which you can generate from  while you are logged in there.

```
Nether\Option::Set('slack-token','YOUR-SLACK-TOKEN');

```

Create an instance of the client to interact with the Slack API.

```
$slack = new DMA\Slack\Client;

```

Then you can send messages.

```
$slack->Send('Hello from our Slack enabled app.');

```

If you do not change any of the other options you should see a message from Optimus Prime in your #general channel.

Advanced Usage
--------------

[](#advanced-usage)

### More options at app config time...

[](#more-options-at-app-config-time)

These are all the options available to set at application config time.

```
Nether\Option::Set([
	'slack-token' => 'YOUR-SLACK-TOKEN',
	'slack-default-channel' => '#channel',
	'slack-default-name' => 'bot name of choice',
	'slack-default-icon' => 'url to public accessable image for chat icon',
	'slack-channels' => [ 'action-name' => 'channel', ... ]
]);

```

### More options at instance time (overwrites prev options)...

[](#more-options-at-instance-time-overwrites-prev-options)

These are all the options available to set at instance create time.

```
$slack = new DMA\Slack\Client([
	'DefaultChannel' => '#channel',
	'DefaultName' => 'bot name of choice',
	'DefaultIcon' => 'url to icon',
	'Token' => 'YOUR-SLACK-TOKEN'
]);

```

### More options at message send time...

[](#more-options-at-message-send-time)

And these are all the options available to set at message send time.

```
$slack->Send('message here',[
	'Channel' => '#DifferentChannel',
	'Name' => 'Different Bot Name',
	'Icon' => 'url to different icon'
]);

```

If all you want to do is send to a different channel or user than the default.

```
$slack->SendToChannel($chan,$msg);

```

Or send to a different channel as specified by any actions configured.

```
// send user-add action notifications to the team.
$slack->SendToChannel('--user-add',$msg);

```

### Sending an API request we have not wrapped...

[](#sending-an-api-request-we-have-not-wrapped)

```
$slack->SendRequest(string method, array args);

```

The method name is the final part of the API url specified in the Slack documentation. The argument array then would be an associative array where the keys are the names of the parameters as Slack says, with the values you want to send.

Copyright
=========

[](#copyright)

This software is Copyright (c) 2014 Dream Machine Association, LLC. See the bundled LICENSE file (BSD-2-Clause) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

3734d ago

Major Versions

v1.0.0 → v2.0.02016-02-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/b64ee49e86efa67a7de4afdc42c2686460d1e46ac7eac7e6ccfa6407ec7d979a?d=identicon)[bobmagicii](/maintainers/bobmagicii)

---

Top Contributors

[![bobmagicii](https://avatars.githubusercontent.com/u/881944?v=4)](https://github.com/bobmagicii "bobmagicii (8 commits)")

---

Tags

phpslack

### Embed Badge

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

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

PHPackages © 2026

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