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

ActiveLibrary[API Development](/categories/api)

rkarkut/slack-package
=====================

PHP package for integrating with Slack API.

091PHP

Since Sep 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/slummer87/slack-api-package)[ Packagist](https://packagist.org/packages/rkarkut/slack-package)[ RSS](/packages/rkarkut-slack-package/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Slack API package
=================

[](#slack-api-package)

Package for integrating with Slack API.

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

[](#requirements)

- PHP 5.3 or higher
- Curl

Installation
============

[](#installation)

You can install the package using the `Composer` package manager. You can install it by running this command in your project root.

```
composer require rkarkut/slack-package:master-dev
```

Then create an Application in your Slack account for the package to use. You will need the `Client ID` and `Client Secret` to prepare authorization script.

Basic USage
-----------

[](#basic-usage)

### Create client instance and test API connection

[](#create-client-instance-and-test-api-connection)

```
// create instance
$client = new \Rkarkut\Slack\Client();

if ($client->api()->test()) {
    // Api is working...
}
```

To test Your token You can call your client instance like in the example below.

```
$client->setToken('your.token');

if ($client->auth()->test()) {
    // Auth is OK...
}
```

### Managing channels

[](#managing-channels)

To manage channels You can call methods like in the examples below.

#### Creating a channel

[](#creating-a-channel)

```
$client->channels()->create("channel.name");
```

#### Archiving a channel

[](#archiving-a-channel)

```
$client->channels()->archive('#channel.name');
```

#### Getting list of channels

[](#getting-list-of-channels)

```
$client->channels()->getList();
```

### Posting messages

[](#posting-messages)

To post a message to any channels You can call methods like in the examples below.

```
$client->chat()->postMessage('post.message', 'name.of.bot');
```

Integrating the package to authorize Your application
-----------------------------------------------------

[](#integrating-the-package-to-authorize-your-application)

To authorize any user with the Application you can use the package like in the example below.

```
// creating client instance
$client = new \Rkarkut\Slack\Client();

// put application client ID and secret
$clientId = 'your.client.id';
$clientSecret = 'client.secret';

// get authorization code from the Slack
$code = $_GET['code'];

// optional parameter
$redirectUrl = null;

// authorize
$result = $client->oauth($clientId, $clientSecret)->access($code, $redirectUrl);
```

Conclusion
----------

[](#conclusion)

I will work on this plugin to add new functionality. If you have any suggestions please log an issue on GitHub.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/26fc85cbdc5477ff006f2c8afca22dafea13fe91c789eef62104ec6496af1127?d=identicon)[slummer87](/maintainers/slummer87)

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

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

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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