PHPackages                             upro/oauth2-yammer - 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. upro/oauth2-yammer

ActiveLibrary

upro/oauth2-yammer
==================

Yammer OAuth 2.0 Client Provider for The PHP League OAuth2-Client

v0.1.1(9y ago)51.6k2[1 issues](https://github.com/upro/oauth2-yammer/issues)MITPHPPHP &gt;=5.5.0

Since Nov 24Pushed 9y ago4 watchersCompare

[ Source](https://github.com/upro/oauth2-yammer)[ Packagist](https://packagist.org/packages/upro/oauth2-yammer)[ RSS](/packages/upro-oauth2-yammer/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Yammer Provider for OAuth 2.0 Client
====================================

[](#yammer-provider-for-oauth-20-client)

[![Latest Version](https://camo.githubusercontent.com/c2549db0f472479430121d9f21e738f8e8c8f1003db2a986a797fed2a5860fb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7570726f2f6f61757468322d79616d6d65722e7376673f7374796c653d666c61742d737175617265)](https://github.com/upro/oauth2-yammer/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/bdde9192b43ca9b05f7ff04ad7587bf1c77928fa0b30c414608f37ee3c534d09/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7570726f2f6f61757468322d79616d6d65722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/upro/oauth2-yammer)[![Total Downloads](https://camo.githubusercontent.com/954da9b650192f5bbb7b4dbfce42b844bf13a354fcd9510ed88e095a968a7117/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7570726f2f6f61757468322d79616d6d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/upro/oauth2-yammer)

This package provides Yammer OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

### Requirements

[](#requirements)

- PHP version 5.5 or higher.

### Installing via Composer

[](#installing-via-composer)

The preferred method of installing this library is through the [Composer](http://getcomposer.org) dependency management tool.

Add the following dependency to your `composer.json`:

```
{
  "require": {
    "upro/oauth2-yammer": "~0.1"
  }
}
```

Or simply run the following command line to install the latest stable version:

```
$ composer require upro/oauth2-yammer
```

Then, require the `vendor/autoload.php` file to enable the autoloading mechanism provided by Composer. Otherwise, your application won't be able to find the classes of this library.

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\UPro\OAuth2\Client\Provider\Yammer` as the provider.

### Authorization Code Flow

[](#authorization-code-flow)

```
require __DIR__.'/vendor/autoload.php';

$provider = new UPro\OAuth2\Client\Provider\Yammer([
    'clientId'          => '{yammer-client-id}',
    'clientSecret'      => '{yammer-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
]);

// If we don't have an authorization code then get one
if (!isset($_GET['code'])) {
    $authorizationUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: '.$authorizationUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
    unset($_SESSION['oauth2state']);
    exit('Invalid state');

} else {

    // Try to get an access token (using the authorization code grant)
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code']
    ]);

    // Optional: Now you have a token you can look up a users profile data
    try {

        // We got an access token, let's now get the user's details
        $user = $provider->getResourceOwner($token);

        // Use these details to create a new profile
        printf('Hello %s!', $user->getName());

    } catch (Exception $e) {

        // Failed to get user details
        exit('Oh dear...');
    }

    // Use this to interact with an API on the users behalf
    echo $token->getToken();
}
```

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/upro/oauth2-yammer/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Contributors](https://github.com/upro/oauth2-yammer/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/upro/oauth2-yammer/blob/master/LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Every ~131 days

Total

2

Last Release

3322d ago

### Community

---

Top Contributors

[![gletournel](https://avatars.githubusercontent.com/u/3897207?v=4)](https://github.com/gletournel "gletournel (14 commits)")

---

Tags

oauth-clientoauth2phpphp-league

### Embed Badge

![Health badge](/badges/upro-oauth2-yammer/health.svg)

```
[![Health](https://phpackages.com/badges/upro-oauth2-yammer/health.svg)](https://phpackages.com/packages/upro-oauth2-yammer)
```

PHPackages © 2026

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