PHPackages                             lisennk/laravel-slack-web-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. lisennk/laravel-slack-web-api

ActiveLibrary[API Development](/categories/api)

lisennk/laravel-slack-web-api
=============================

Light Laravel wrapper for Slack Web API

0.1.1(9y ago)2117.7k2MITPHP

Since Aug 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Lisennk/Laravel-Slack-Web-API)[ Packagist](https://packagist.org/packages/lisennk/laravel-slack-web-api)[ RSS](/packages/lisennk-laravel-slack-web-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

🚀 Laravel Slack API 🚀
=====================

[](#rocket-laravel-slack-api-rocket)

[![Latest Stable Version](https://camo.githubusercontent.com/bca0579c42df0a66718ba8904551c0ce57daea63acc6c54a13c758f6b558db1f/68747470733a2f2f706f7365722e707567782e6f72672f6c6973656e6e6b2f6c61726176656c2d736c61636b2d7765622d6170692f762f737461626c65)](https://packagist.org/packages/lisennk/laravel-slack-web-api)[![Total Downloads](https://camo.githubusercontent.com/95d9f303ee1e9972ae88f6da389bcfa78e2ca865143225c49c4cf304460dff02/68747470733a2f2f706f7365722e707567782e6f72672f6c6973656e6e6b2f6c61726176656c2d736c61636b2d7765622d6170692f646f776e6c6f616473)](https://packagist.org/packages/lisennk/laravel-slack-web-api)[![License](https://camo.githubusercontent.com/193b46e2e551007db98b72c775f454e1998bfc4fde58a35e8561d7d19e4198d3/68747470733a2f2f706f7365722e707567782e6f72672f6c6973656e6e6b2f6c61726176656c2d736c61636b2d7765622d6170692f6c6963656e7365)](https://packagist.org/packages/lisennk/laravel-slack-web-api)[![Build Status](https://camo.githubusercontent.com/d77eb076fd533c81f462add13c23a794132847df46ece472d97b8a7ee48d3b46/68747470733a2f2f7472617669732d63692e6f72672f4c6973656e6e6b2f4c61726176656c2d536c61636b2d5765622d4150492e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Lisennk/Laravel-Slack-Web-API)

Lightweight Laravel 5 wrapper for the Slack Web API, including a facade and config options.

Please note that this implementation is very lightweight meaning you'll need to do some more work than usual, but in return you get a lot more flexibility. This package doesn't provide methods such as `Chat::postMessage(string $message)`, it just provides one method: `SlackApi::execute(string $method, array $parameters)`.

**👍 Reasons to use this package for the Slack API:**

- Built-in compliance with the Slack API [rate limits](https://api.slack.com/docs/rate-limits)
- Lightweight, flexible
- Modern Laravel integration
- Test coverage
- Lots of emoji in the documentation (even cats! 🐈)

🌎 Installation
--------------

[](#earth_americas-installation)

**1)** Require the package with Composer

```
composer require lisennk/laravel-slack-web-api
```

**2)** Open `config/app.php` and add `\Lisennk\Laravel\SlackWebApi\Providers\SlackApiServiceProvider::class` to the `providers[]` array

*For example:*

```
  // ...

  'providers' => [
    // ...
    // A whole bunch of providers
    // ...

    \Lisennk\Laravel\SlackWebApi\Providers\SlackApiServiceProvider::class
  ],

  // ...
```

**3)** If you want to use the Facade, add `\Lisennk\Laravel\SlackWebApi\Facades\SlackApi::class` to the `aliases[]` array in `config/app.php`

*For example:*

```
  // ...

  'aliases' => [
    // ...
    // A whole bunch of aliases
    // ...

    'SlackApi' => \Lisennk\Laravel\SlackWebApi\Facades\SlackApi::class
  ],

  // ...
```

**4)** Publish the config file

```
php artisan vendor:publish
```

**5)** Open `config/slack.php` and insert your [token](https://api.slack.com/docs/oauth-test-tokens) to make API requests

```
'token' => 'your-token-here'
```

🍴 Usage
-------

[](#fork_and_knife-usage)

To make Slack API requests, you need to call the `execute` method of the `SlackApi` class and pass the Slack Web API method name and any parameters. For example:

```
$api->execute('method.name', [
  'parameter_one' => 'some-data',
  'parameter_two' => 'some-other-data'
  // ...
];
```

This will return a plain PHP array containing the response data from Slack.

\####**1)** Basic example of usage in a Controller:

```
use \Lisennk\Laravel\SlackWebApi\SlackApi;
use \Lisennk\Laravel\SlackWebApi\Exceptions\SlackApiException;

// ...

public function postMessage(SlackApi $api)
{
  try {
    $response = $api->execute('users.info', [
      'user' => 'U1234567890'
    ]);
    $name = $response['user']['name'];
    // Do something amazing with data from Slack...
  } catch (SlackApiException $e) {
    return 'Error:' . $e->getMessage();
  }
}

// ...
```

\####**2)** Basic usage with the Facade:

```
use \Lisennk\Laravel\SlackWebApi\Exceptions\SlackApiException;

// ...

public function postMessage()
{
  try {
    $response = SlackApi::execute('users.info', [
      'user' => 'U1234567890'
    ]);
    $name = $response['user']['name'];
    // Do something amazing with data from Slack...
  } catch (SlackApiException $e) {
    return 'Error:' . $e->getMessage();
  }
}

// ...
```

🌺 Contributing
--------------

[](#hibiscus-contributing)

Feel free to create pull requests or issues, and report typos.

📚 Reference
-----------

[](#books-reference)

- To use Slack Events API, we recommend the [Laravel Slack Events API package](https://github.com/Lisennk/Slack-Events)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% 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 ~0 days

Total

2

Last Release

3555d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/699000916bce875e9b9283104bd13802625e26c7999f5725e9e9ae112fa87d1c?d=identicon)[Lisennk](/maintainers/Lisennk)

---

Top Contributors

[![Lisennk](https://avatars.githubusercontent.com/u/8103985?v=4)](https://github.com/Lisennk "Lisennk (17 commits)")[![sbine](https://avatars.githubusercontent.com/u/1902973?v=4)](https://github.com/sbine "sbine (1 commits)")

---

Tags

apilaravelslack

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lisennk-laravel-slack-web-api/health.svg)

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

###  Alternatives

[joisarjignesh/bigbluebutton

BigBlueButton Server API Library for Laravel

162145.5k1](/packages/joisarjignesh-bigbluebutton)[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)
