PHPackages                             mediumart/intercom - 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. mediumart/intercom

ActiveLibrary[API Development](/categories/api)

mediumart/intercom
==================

Intercom API \[Macroable\] client adapter for laravel

0.2.3(5y ago)855.0k1[6 PRs](https://github.com/mediumart/intercom/pulls)MITPHP

Since Feb 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mediumart/intercom)[ Packagist](https://packagist.org/packages/mediumart/intercom)[ RSS](/packages/mediumart-intercom/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (5)Versions (18)Used By (0)

Mediumart Intercom
==================

[](#mediumart-intercom)

[![Build Status](https://camo.githubusercontent.com/875410d29b21b48f1bb513234cdf2038a95214eeb3efdb7742350c774b4f6b79/68747470733a2f2f7472617669732d63692e6f72672f6d656469756d6172742f696e746572636f6d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mediumart/intercom)[![Coverage Status](https://camo.githubusercontent.com/936c59384c31efa26880cb8d92f768620ece55b9982b7b5c6cdee7eed59ca00e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d656469756d6172742f696e746572636f6d2f62616467652e737667)](https://coveralls.io/github/mediumart/intercom)[![Latest Stable Version](https://camo.githubusercontent.com/ff9f512d5bebe53e8e11a4921061c714fff74af0d21316f62f23cbb2ad03fa25/68747470733a2f2f706f7365722e707567782e6f72672f6d656469756d6172742f696e746572636f6d2f762f737461626c65)](https://packagist.org/packages/mediumart/intercom)[![License](https://camo.githubusercontent.com/b5c106e36ab3dda6a254d8f51e4ba210242594a872ff7012150809a165877b5a/68747470733a2f2f706f7365722e707567782e6f72672f6d656469756d6172742f696e746572636f6d2f6c6963656e7365)](https://packagist.org/packages/mediumart/intercom)[![Total Downloads](https://camo.githubusercontent.com/40cf367491f28ad0095371cb46eb2b9a7eb8c1f327ecc5a3fd9686623a813075/68747470733a2f2f706f7365722e707567782e6f72672f6d656469756d6172742f696e746572636f6d2f646f776e6c6f616473)](https://packagist.org/packages/mediumart/intercom)

> Mediumart Intercom Client is macroable !

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

[](#installation)

To install, first require the package via composer:

```
$ composer require mediumart/intercom

```

Next add the following to your `config/app.php` inside the `'providers'` array:

```
Mediumart\Intercom\IntercomServiceProvider::class
```

and the facade reference inside the `'aliases'` array:

```
'Intercom' => Mediumart\Intercom\Intercom::class
```

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

[](#configuration)

You need to create an `app` with an associated `access_token` from your [intercom.io](https://app.intercom.io/admins/sign_in) account. You can find informations on how to do that [here](https://developers.intercom.com/building-apps/docs/authorization).

Once you got your access token, open the `config/services.php` in your laravel project and add a key for the `intercom` service like this:

```
'intercom' => [
    'access_token' => ''
]

```

The package will automatically pick out the token to authenticate any api request to your own intercom data.

Usage
-----

[](#usage)

You can resolve the intercom `Client` in many ways:

```
use Mediumart\Intercom\Client;

/**
* Manually resolving from the container
* */
$intercom = app('intercom');
// or
$intercom = app(Client::class);

/**
* using type hinting and laravel's automatic resolution
* */
public function index(Client $intercom)
{
    /.../
}

/**
* Simply leverage the facade
* */
$intercomUsers = Intercom::users();
```

Using the `instance` or the `facade`, any resource type is mirrored as a method on the `Client`, that can be used to gain the corresponding resource object :

```
// facade
$leads = Intercom::leads();

// instance
$intercom = app('intercom');
$conversations = $intercom->conversations();
```

Using the `instance` approach you can also resolve the resource instance as a property of the `Client`:

```
$conversations = $intercom->conversations;
```

Here is the list of all the Intercom resources types :

- `users`
- `events`
- `companies`
- `messages`
- `conversations`
- `leads`
- `visitors`
- `admins`
- `tags`
- `segments`
- `counts`
- `bulk`
- `notes`

You can find related informations on their [official documentation page](https://developers.intercom.com/intercom-api-reference/reference#users) and the api usage for each resource [here](https://github.com/intercom/intercom-php/blob/master/README.md#users).

In addition, you can also set the token in a fluent way, after the `Client` has been resolved, using the `setToken` method:

```
$intercom->setToken($token)->users->getUser($id);

```

Defining Macros
---------------

[](#defining-macros)

To create a macro function, you can use the `macro` method on either the `facade` or the `instance`, this method accepts a `name` as its first argument, and a `callable` as its second.

```
// facade
Intercom::macro('usersEmails', function () {
   return // your logic here ...
});

// instance
$intercom->macro('usersEmails', function () use ($intercom) {
   return // your logic here ...
});
```

Your `macro` can now be called as a regular method on intercom facade or instance

```
// facade
$userEmails = Intercom::usersEmails();

// instance
$userEmails = $intercom->usersEmails();
```

License
-------

[](#license)

Mediumart Intercom is an open-sourced software licensed under the [MIT license](https://github.com/mediumart/intercom/blob/master/LICENSE.txt).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 95.7% 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 ~112 days

Recently: every ~277 days

Total

12

Last Release

2168d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76d279b09dcc42437866a38f691f12719533b305de249bdde754a1f453939fc2?d=identicon)[isaacesso](/maintainers/isaacesso)

---

Top Contributors

[![isaacesso](https://avatars.githubusercontent.com/u/6454100?v=4)](https://github.com/isaacesso "isaacesso (45 commits)")[![ngrampsas](https://avatars.githubusercontent.com/u/9724046?v=4)](https://github.com/ngrampsas "ngrampsas (1 commits)")[![pierrocknroll](https://avatars.githubusercontent.com/u/1803819?v=4)](https://github.com/pierrocknroll "pierrocknroll (1 commits)")

---

Tags

apiintercomlaravelphplaravelintercomintercom.io

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mediumart-intercom/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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