PHPackages                             geekdpt/slamp - 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. geekdpt/slamp

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

geekdpt/slamp
=============

Asynchronous Slack client for PHP, with Web &amp; RTM APIs support

0.1.0(9y ago)519MITPHP

Since Aug 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/geekdpt/slamp)[ Packagist](https://packagist.org/packages/geekdpt/slamp)[ RSS](/packages/geekdpt-slamp/feed)WikiDiscussions develop Synced 4w ago

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

[![Slamp logo](https://raw.githubusercontent.com/geekdpt/slamp/develop/slamp.png)](https://raw.githubusercontent.com/geekdpt/slamp/develop/slamp.png)

slamp
=====

[](#slamp)

An asynchronous Slack [RTM](https://api.slack.com/rtm) &amp; [Web](https://api.slack.com/web) APIs client for PHP 7, powered by the [Amp asynchronous framework](https://github.com/amphp), providing a typed experience and full-featured interfaces.

Forget those cURL wrappers and go async!

[![SensioLabsInsight](https://camo.githubusercontent.com/9cbe7142d454c60107c994d075cd74f79d57e4ba7652383e49fdc55a2949175d/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f64383738646235612d656334322d346131322d393935652d3037343232666665666132382e7376673f7374796c653d666c61742d737175617265266c6162656c3d696e7369676874)](https://insight.sensiolabs.com/projects/e9103654-845f-40b7-8eeb-009e49e09067)[![Packagist (Composer)](https://camo.githubusercontent.com/a49d7e28143b85f560d813b0e672d30ae3ae98b899af8dc1974a0bfa93913cc1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6765656b6470742f736c616d702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/geekdpt/slamp)[![MIT License](https://camo.githubusercontent.com/402408c274c818bfdb17183b903cd3942b517c9e89fbf8069a460563c43bb355/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6765656b6470742f736c616d702e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/402408c274c818bfdb17183b903cd3942b517c9e89fbf8069a460563c43bb355/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6765656b6470742f736c616d702e7376673f7374796c653d666c61742d737175617265)

---

1. [Installation](#installation)
2. [Usage](#usage) we'll learn how to do those node-ish things
3. Slamp APIs
    - [Web API](#web-api) call any Slack Web API methods
    - [Web API - Simple Message Composing](#simple-message-composing) a fluent API for sending messages
    - [RTM API](#rtm-api) realtime connection to your Slack team!
4. [Error handling](#error-handling) because sh\*\* always happens

---

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

[](#installation)

Usage
-----

[](#usage)

Web API
-------

[](#web-api)

Simple Message Composing
------------------------

[](#simple-message-composing)

Inspired by [maknz/slack](https://github.com/maknz/slack), this API is based on top of the Web API and intends to provide a simple interface for sending messages to channels, groups or IM channels. You have to create a Web API client to begin, then call `compose()` to create a new message instance.

A basic usage example could be:

```
$client = Slamp\webClient(TOKEN);
yield $client->compose()->sendAsync('Hello there!');
```

You can also set the target channel and/or the bot name :

```
yield $client->compose()->from('Hello Bot')->to('#general')->sendAsync('Hey, wassup #general?');
```

The `to("...")` argument supports different notations:

- `#channel`, `C024BE91L` for a public channel
- `private-group`, `G012AC86C` for a private group
- `@username` to post an IM message to the @slackbot inbox of the receiver (you will *not* appear as "slackbot")
- `D023BB3L2` to post as the bot itself (and not slackbot like before) (you have to create such channel before)

You can even edit messages or delete them after they are sent:

```
$message = yield $client->compose()->to('@guy')->sendAsync('I hate you');

# What I have done.. ?!
yield $message->updateAsync('I love u');

# I should calm down...
yield $message->deleteAsync();
```

Here is a more complete list of the possible calls:

```
$msg = Slamp\webClient(TOKEN)->compose()
    ->from('Sender name')
    ->withIcon(':robot:') # emoji code, or custom image with an URL
    ->to('#channel')
    ->withParsing('full') # defaults to "none", see api.slack.com/docs/message-formatting
    ->linkingNames(true) # defaults to false, sets whether token like #general or @username are parsed and transformed into links
    ->sendAsync('the message text');

Amp\wait($msg);
```

**Note**: attachments are not yet supported.

**Warning**: Please do not rely on the type behind these methods. Just use the methods. Don't manipulate the MessageComposer direclty, as the way it is created may change radically in a future version.

RTM API
-------

[](#rtm-api)

Error handling
--------------

[](#error-handling)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Unknown

Total

1

Last Release

3600d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/434598cd8e66845191010e4bcb5db8e8278947458da045be5286020d8d97a581?d=identicon)[morgan-linux](/maintainers/morgan-linux)

---

Top Contributors

[![Neofox](https://avatars.githubusercontent.com/u/6177937?v=4)](https://github.com/Neofox "Neofox (1 commits)")

### Embed Badge

![Health badge](/badges/geekdpt-slamp/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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