PHPackages                             insidieux/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. [HTTP &amp; Networking](/categories/http)
4. /
5. insidieux/slack-api

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

insidieux/slack-api
===================

Simple Slack API client wih predefined methods

1.4.2(5y ago)528.4k↑126.5%2[4 issues](https://github.com/insidieux/SlackApi/issues)MITPHPPHP &gt;=5.5.0

Since Mar 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/insidieux/SlackApi)[ Packagist](https://packagist.org/packages/insidieux/slack-api)[ RSS](/packages/insidieux-slack-api/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (11)Used By (0)

SlackApi
========

[](#slackapi)

This project is very outdated and behind the current actual version of php, as well as the current version of the Slack API. We strongly DO NOT RECOMMEND you to use this library and we advise you to switch to one of the published packages from the official Slack documentation - [![Build Status](https://camo.githubusercontent.com/453d24f5e198dfd8c1bed33cb22b470154578d4e2e451aff5f0d1d4bf0179cce/68747470733a2f2f7472617669732d63692e6f72672f696e736964696575782f536c61636b4170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/insidieux/SlackApi)[![Code Climate](https://camo.githubusercontent.com/afecaea1da86a0cd06950ba0334c4babbf51cbf2108b71946cc456e46f166f91/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f696e736964696575782f536c61636b4170692f6261646765732f6770612e737667)](https://codeclimate.com/github/insidieux/SlackApi)[![Test Coverage](https://camo.githubusercontent.com/16a2f8e7220bf352fa27ac3a53783eca4eb957dfc4cc38875b7c8097c1f93f10/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f696e736964696575782f536c61636b4170692f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/insidieux/SlackApi/coverage)[![Codacy Badge](https://camo.githubusercontent.com/afdcd07c195b36777080cd85f460fd8995403c1ffd555a91fade7ad94e838d75/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f67726164652f6230306566346330316566323464616161663537663939633334356164353436)](https://www.codacy.com/app/ageev-pavel-v/SlackApi)[![Codacy Badge](https://camo.githubusercontent.com/34fb222fbd4abfb9ab24af434b16260f5110ef9535d4365555c16ec10be9b681/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f636f7665726167652f6230306566346330316566323464616161663537663939633334356164353436)](https://www.codacy.com/app/insidieux/SlackApi)

A simple PHP package for making request to [Slack API](https://api.slack.com/methods), focused on ease-of-use and elegant syntax.

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

[](#requirements)

- PHP 5.5 or greater
- [CURL extension for PHP](http://php.net/manual/ru/book.curl.php)

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

[](#installation)

You can install the package using the [Composer](https://getcomposer.org/) package manager. You can install it by running this command in your project root:

```
composer require insidieux/slack-api
```

Usage
-----

[](#usage)

Create API client

```
$client = new \SlackApi\Client('your-token-here');
```

Make request

```
$client = new \SlackApi\Client('your-token-here');
$response = $client->request('module.method', ['argument' => 'value']);
$response->toArray();
```

Or you can use predefined modules and methods

```
$client = new \SlackApi\Client('your-token-here');
$response = $client->users()->getList();
$response->toArray()
```

Predefined modules:

- \[channels\] ()
- \[chat\] ()
- \[dnd\] ()
- \[emoji\] ()
- \[files\] ()
- \[groups\] ()
- \[im\] ()
- \[oauth\] ()
- \[pins\] ()
- \[search\] ()
- \[team\] ()
- \[usergroups\] ()
- \[users\] ()

### Message and attachment objects

[](#message-and-attachment-objects)

Create message object

```
$client = new \SlackApi\Client('your-token-here');
$message = new \SlackApi\Models\Message($client);
```

or

```
$client = new \SlackApi\Client('your-token-here');
$message = $client->makeMessage();
```

Create new attachment from array

```
$data = [
    'fallback' => 'Some fallback'
    'pretext'  => 'Some pretext',
    'text'     => 'good',
    'text'     => 'Some text'
];
$attachment1 = new \SlackApi\Models\Attachment($data);
```

Or use set methods

```
$attachment2 = new \SlackApi\Models\Attachment;
$attachment2->setText('Some text')
    ->setColor(\SlackApi\Models\Attachment::COLOR_GOOD)
    ->setFallback('Some fallback');
```

Add field to attachment

```
$field = new \SlackApi\Models\AttachmentField;
$field->setShort(false)
    ->setTitle('Field title')
    ->setValue('Field value');
$attachment->addField($field);
```

Attach object to message

```
$message->attach($attachment);
```

Send message

```
$response = $message->send();
$response->toArray()
```

Author
------

[](#author)

- [Ageev Pavel](mailto:ageev.pavel.v@gmail.com)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 90.5% 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 ~223 days

Recently: every ~403 days

Total

9

Last Release

1972d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fa458d0d9f4e3983b9fe190a6543db6a7dbf1446c2ffd220eb933eccf851188?d=identicon)[insidieux](/maintainers/insidieux)

---

Top Contributors

[![insidieux](https://avatars.githubusercontent.com/u/6401826?v=4)](https://github.com/insidieux "insidieux (19 commits)")[![kamynina](https://avatars.githubusercontent.com/u/6712481?v=4)](https://github.com/kamynina "kamynina (2 commits)")

---

Tags

httpapiclientcurlslackslack-apislack-sdkinsidieux

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[aplus/http-client

Aplus Framework HTTP Client Library

2171.6M1](/packages/aplus-http-client)[vinelab/http

An http library developed for the laravel framework. aliases itself as HttpClient

59302.6k11](/packages/vinelab-http)[e-moe/guzzle6-bundle

Integrates Guzzle 6 into your Symfony application

12262.2k1](/packages/e-moe-guzzle6-bundle)[openapi/openapi-sdk

Minimal and agnostic PHP SDK for Openapi® (https://openapi.com)

171.5k1](/packages/openapi-openapi-sdk)

PHPackages © 2026

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