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

ActiveLibrary[API Development](/categories/api)

wgmv/laravel-slack-api
======================

Wrapper for Slack.com WEB API. Based on code from Vagner do Carmo.

v0.5.0(8y ago)623.4k1DBADPHPPHP &gt;=5.5.9

Since Feb 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wgmv/laravel-slack-api)[ Packagist](https://packagist.org/packages/wgmv/laravel-slack-api)[ RSS](/packages/wgmv-laravel-slack-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (5)Versions (25)Used By (0)

Laravel 5 and Lumen - Slack API
-------------------------------

[](#laravel-5-and-lumen---slack-api)

[![Latest Stable Version](https://camo.githubusercontent.com/f467655213e0eea0a904fd4cbd6c06f02e4acbda48118df19f7bcd98f2f27df1/68747470733a2f2f706f7365722e707567782e6f72672f77676d762f6c61726176656c2d736c61636b2d6170692f76657273696f6e)](https://packagist.org/packages/wgmv/laravel-slack-api)[![Total Downloads](https://camo.githubusercontent.com/3992b9e0606c3e04016f6cd71287a7d6b18e141ad251077bc55e6ac56f30fde6/68747470733a2f2f706f7365722e707567782e6f72672f77676d762f6c61726176656c2d736c61636b2d6170692f646f776e6c6f616473)](https://packagist.org/packages/wgmv/laravel-slack-api)[![Latest Unstable Version](https://camo.githubusercontent.com/72fff19e31dee8b200545faae796cd4ee1490c670c5972eaa070b9cdd9f03e4c/68747470733a2f2f706f7365722e707567782e6f72672f77676d762f6c61726176656c2d736c61636b2d6170692f762f756e737461626c65)](//packagist.org/packages/wgmv/laravel-slack-api)[![License](https://camo.githubusercontent.com/b04b3503b4f22740131a2c26a31f96dd70cb6dbe6976b52abcfdf3e4777b8e00/68747470733a2f2f706f7365722e707567782e6f72672f77676d762f6c61726176656c2d736c61636b2d6170692f6c6963656e7365)](https://packagist.org/packages/wgmv/laravel-slack-api)

[![StyleCI](https://camo.githubusercontent.com/be7595e26ce047a0c4afeb00ace9dc31788885136de79632a3cfefa838c230b6/68747470733a2f2f7374796c6563692e696f2f7265706f732f3130323930333937302f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/102903970)

This package provides a simple way to use the [Slack API](https://api.slack.com).

The package is a fork from  The original package is not maintained and I made several changes that possibly make this version incompatible to the original.

### Changes made:

[](#changes-made)

- removed functionality to lookup user by nickname: this package provides basic functionality
- removed cache as it was not needed anymore
- added basic tests
- updated slack api options on a couple of methods
- fixed minor bugs

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

[](#installation)

`composer require wgmv/laravel-slack-api`

Installation on Laravel 5
-------------------------

[](#installation-on-laravel-5)

The package has autodiscovery enabled. (A laravel 5.5 feature)

```
[
    'providers' => [
        Wgmv\SlackApi\SlackApiServiceProvider::class,
    ]
]
```

Configuration
-------------

[](#configuration)

This package uses slacks legacy tokens. Get you token here:

Configure your slack team token in `config/services.php`

```
[
    //...,
    'slack' => [
        'token' => 'your token here'
    ]
]
```

Installation on Lumen
---------------------

[](#installation-on-lumen)

I have not tested the lumen installation! Documentation from the original package:

Add the following line on `bootstrap/app.php`:

```
// $app->register('App\Providers\AppServiceProvider'); (by default that comes commented)
$app->register('Wgmv\SlackApi\SlackApiServiceProvider');
```

If you want to use facades, add this lines on `bootstrap/app.php`

```
class_alias('Wgmv\SlackApi\Facades\SlackApi', 'SlackApi');
//... and others
```

Otherwise, just use the singleton shortcuts:

```
/** @var \Wgmv\SlackApi\Contracts\SlackApi $slackapi */
$slackapi     = app('slack.api');

/** @var \Wgmv\SlackApi\Contracts\SlackChannel $slackchannel */
$slackchannel = app('slack.channel');

etc
```

Example Usage
-------------

[](#example-usage)

```
//Lists all users on your team
SlackUser::lists();

//Lists all channels on your team
SlackChannel::lists();

//List all groups
SlackGroup::lists();

//Invite a new member to your team
SlackUserAdmin::invite("example@example.com", [
    'first_name' => 'John',
    'last_name' => 'Doe'
]);

// or just use the helper

//Autoload the api
slack()->post('chat.postMessage', [...]);

//Autoload a Slack Method
slack('Chat')->message([...]);
slack('Team')->info();
```

All Injectable Contracts:
-------------------------

[](#all-injectable-contracts)

### Generic API

[](#generic-api)

`Wgmv\SlackApi\Contracts\SlackApi`

Allows you to do generic requests to the api with the following http verbs: `get`, `post`, `put`, `patch`, `delete` ... all allowed api methods you could see here: [Slack Web API Methods](https://api.slack.com/methods).

### Channels API

[](#channels-api)

`Wgmv\SlackApi\Contracts\SlackChannel`

Allows you to operate channels: `invite`, `archive`, `rename`, `join`, `kick`, `setPurpose` ...

### Chat API

[](#chat-api)

`Wgmv\SlackApi\Contracts\SlackChat`

Allows you to send, update and delete messages with methods: `delete`, `message`, `update`.

### Files API

[](#files-api)

`Wgmv\SlackApi\Contracts\SlackFile`

Allows you to send, get info, delete, or just list files: `info`, `lists`, `upload`, `delete`.

### Groups API

[](#groups-api)

`Wgmv\SlackApi\Contracts\SlackGroup`

Same methods of the SlackChannel, but that operates with groups and have adicional methods: `open`, `close`, `createChild`

### Instant Messages API (Direct Messages)

[](#instant-messages-api-direct-messages)

`Wgmv\SlackApi\Contracts\SlackInstantMessage`

Allows you to manage direct messages to your team members.

### Real Time Messages API

[](#real-time-messages-api)

`Wgmv\SlackApi\Contracts\SlackRealTimeMessage`

Allows you list all channels and user presence at the moment.

### Search API

[](#search-api)

`Wgmv\SlackApi\Contracts\SlackSearch`

Find messages or files.

### Stars API

[](#stars-api)

`Wgmv\SlackApi\Contracts\SlackStar`

List all of starred itens.

### Team API

[](#team-api)

`Wgmv\SlackApi\Contracts\SlackTeam`

Get information about your team.

### Users API

[](#users-api)

`Wgmv\SlackApi\Contracts\SlackUser`

Get information about an user on your team or just check your presence ou status.

### Users Admin API

[](#users-admin-api)

`Wgmv\SlackApi\Contracts\SlackUserAdmin`

Invite new members to your team.

License
-------

[](#license)

[DBAD License](https://dbad-license.org).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~157 days

Total

24

Last Release

3159d ago

PHP version history (2 changes)v0.0.1PHP &gt;=5.4.0

v0.3.0PHP &gt;=5.5.9

### Community

Maintainers

![](https://www.gravatar.com/avatar/002ba70ff69fd4c198adf93340330455a3df7a154fc6a8e867a56b449f73eb4a?d=identicon)[wgmv](/maintainers/wgmv)

---

Top Contributors

[![vluzrmos](https://avatars.githubusercontent.com/u/450848?v=4)](https://github.com/vluzrmos "vluzrmos (55 commits)")[![wgmv](https://avatars.githubusercontent.com/u/6874094?v=4)](https://github.com/wgmv "wgmv (51 commits)")[![cloudratha](https://avatars.githubusercontent.com/u/3967435?v=4)](https://github.com/cloudratha "cloudratha (2 commits)")[![jakebathman](https://avatars.githubusercontent.com/u/43112?v=4)](https://github.com/jakebathman "jakebathman (1 commits)")[![JPAntonisse](https://avatars.githubusercontent.com/u/3437215?v=4)](https://github.com/JPAntonisse "JPAntonisse (1 commits)")[![Lisennk](https://avatars.githubusercontent.com/u/8103985?v=4)](https://github.com/Lisennk "Lisennk (1 commits)")[![mlantz](https://avatars.githubusercontent.com/u/1065551?v=4)](https://github.com/mlantz "mlantz (1 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")[![fokosun](https://avatars.githubusercontent.com/u/7254731?v=4)](https://github.com/fokosun "fokosun (1 commits)")

---

Tags

laravel5laravel6slacklaravellumenslack

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[irazasyed/telegram-bot-sdk

The Unofficial Telegram Bot API PHP SDK

3.3k4.5M84](/packages/irazasyed-telegram-bot-sdk)[mollie/laravel-mollie

Mollie API client wrapper for Laravel &amp; Mollie Connect provider for Laravel Socialite

3624.1M28](/packages/mollie-laravel-mollie)

PHPackages © 2026

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