PHPackages                             turanct/engagor-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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. turanct/engagor-api

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

turanct/engagor-api
===================

PHP client for the Clarabridge Engage API

v0.0.5(6y ago)291MITPHPPHP ^7.1CI failing

Since Sep 1Pushed 6y ago1 watchersCompare

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

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

Clarabridge Engage Api
======================

[](#clarabridge-engage-api)

[![Build Status](https://camo.githubusercontent.com/a6a98c8c25e6d0c6730eeb629aa3377eea8992c7969ebb2c1d275813115f8b53/68747470733a2f2f7472617669732d63692e6f72672f747572616e63742f656e6761676f722d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/turanct/engagor-api)

Install
-------

[](#install)

Via [Composer](https://getcomposer.org/)

```
$ composer require turanct/engagor-api
```

Or manually add `turanct/engagor-api` to your `composer.json` and run `composer install`.

Usage
-----

[](#usage)

### Setting up

[](#setting-up)

For this library to work, you'll need a PSR-7, PSR-17 and PSR-18 implementation. It doesn't really matter which ones, but an easy way to get started is to use these in your `composer.json` and then run `composer install`.

```
"nyholm/psr7": "^1.2.0",
"kriswallsmith/buzz": "^1.0.1",
```

In this case PSR-7 and PSR-17 implementations are provided by `nyholm/psr7` and the PSR-18 implementation is `kriswallsmith/buzz`.

### Authentication

[](#authentication)

Create an `Authentication` instance:

```
$httpRequestFactory = new Nyholm\Psr7\Factory\Psr17Factory();
$httpClient = new Buzz\Client\Curl($httpRequestFactory);

$clientId = '';
$clientSecret = '';

$authentication = new Engagor\Authentication(
    $httpClient,
    $httpRequestFactory,
    $clientId,
    $clientSecret
);
```

Once you have created this instance, you can use it to authenticate the user of your app with Engage:

```
$url = $authentication->step1(
    [
        'identify',
        'accounts_read',
        'accounts_write',
        'socialprofiles',
        'email',
    ],
    ''
);
```

This will return an array that you can redirect your users too. Insert a random state, and save it in the user's session so that you can verify later on that the redirect URL that the user will be sent to is valid.

That redirect URL will look a bit like this:

```
https://example.com/your-redirect-url?state=&code=

```

You should verify the state to be the same that you generated when you called `step1()` to create the redirect URL in the previous step. If that check succeeds, the `code` that's also in the request to your redirect endpoint is what you'll need for the next step:

```
$tokens = $authentication->step2('');
```

If it's successful, you should get a `Tokens` object, which holds the access &amp; refresh tokens that we can use to issue calls to the Engage api.

### Making authenticated requests to the API

[](#making-authenticated-requests-to-the-api)

Now that you've obtained a `Tokens` object, you can create a `Client instance`:

```
$client = new Engagor\Client(
    $httpClient,
    $httpRequestFactory,
    $tokens
);
```

The `$httpClient` and `$httpRequestFactory` can be the same instances as described in the [Authentication](#authentication) step above.

Now that you've got an API `$client` instance, you can either call the implemented API methods using the methods with their name, e.g. `/me` will be called `me()`, or you can use the `request()` method to manually make requests to the API.

```
$me = $client->me();
```

or

```
$request = $httpRequestFactory->createRequest(
    'GET',
    'https://api.engagor.com/me/'
);

$response = $client->execute($request);
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Toon Daelman](https://github.com/turanct)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.2% 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 ~19 days

Total

5

Last Release

2367d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcdce4f02b6e4e353431c361e9f193fa469f59cf3eddeca683b6f74efc8efa28?d=identicon)[turanct](/maintainers/turanct)

---

Top Contributors

[![turanct](https://avatars.githubusercontent.com/u/1728360?v=4)](https://github.com/turanct "turanct (25 commits)")[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (1 commits)")

---

Tags

apioauthengageengagorclarabridge

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/turanct-engagor-api/health.svg)

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

###  Alternatives

[league/oauth2-server

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.

6.6k136.0M248](/packages/league-oauth2-server)[kreait/firebase-php

Firebase Admin SDK

2.4k39.7M72](/packages/kreait-firebase-php)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[surfoo/geocaching-php-sdk

Geocaching PHP SDK

143.4k1](/packages/surfoo-geocaching-php-sdk)[bushlanov-dev/max-bot-api-client-php

Max Bot API Client library

281.6k](/packages/bushlanov-dev-max-bot-api-client-php)

PHPackages © 2026

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