PHPackages                             mailium/oauth-client-php - 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. mailium/oauth-client-php

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

mailium/oauth-client-php
========================

Library for authenticating with Mailium Oauth Server

1.0.23(7y ago)39331GNU GPL v3PHPPHP &gt;=5.5.9

Since Sep 26Pushed 7y ago2 watchersCompare

[ Source](https://github.com/mailium/oauth-client-php)[ Packagist](https://packagist.org/packages/mailium/oauth-client-php)[ RSS](/packages/mailium-oauth-client-php/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (4)Used By (1)

Mailium Oauth Client for PHP
============================

[](#mailium-oauth-client-for-php)

[![Latest Stable Version](https://camo.githubusercontent.com/a9aa8aa51af326885f0692489660a4afa97af9322538187e5fc820d1b417cf33/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d7068702f762f737461626c652e737667)](https://packagist.org/packages/mailium/oauth-client-php) [![Monthly Downloads](https://camo.githubusercontent.com/cd2226c7282869c89dea26d6ad6c7735ead962b1a43ecf4da0619da72f42703a/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d7068702f642f6d6f6e74686c792e706e67)](https://packagist.org/packages/mailium/oauth-client-php) [![License](https://camo.githubusercontent.com/9ec723a8f96a8873b63fd3a78e1c0a638e2b3b2899e6ed90e2553315768a9591/68747470733a2f2f706f7365722e707567782e6f72672f6d61696c69756d2f6f617574682d636c69656e742d7068702f6c6963656e73652e737667)](https://packagist.org/packages/mailium/oauth-client-php) [![Build Status](https://camo.githubusercontent.com/01abf916dee9a233c4140c7aa55632f37e68b9551bee8fbe29c14a1aa1949f7e/68747470733a2f2f7472617669732d63692e6f72672f6d61696c69756d2f6f617574682d636c69656e742d7068702e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/01abf916dee9a233c4140c7aa55632f37e68b9551bee8fbe29c14a1aa1949f7e/68747470733a2f2f7472617669732d63692e6f72672f6d61696c69756d2f6f617574682d636c69656e742d7068702e7376673f6272616e63683d6d6173746572)

Mailium Oauth Client provides easy to use wrappers for authorizing your application and getting the tokens required to talk to the API.

Example application
-------------------

[](#example-application)

An example application can be found under example directory.

This is a simple working application that utilizes most of the features of the client.

Quick Start
-----------

[](#quick-start)

### First, let's install the library with composer:

[](#first-lets-install-the-library-with-composer)

```
    composer require mailium/oauth-client-php
```

### Initialize the client with your client\_id and client\_secret

[](#initialize-the-client-with-your-client_id-and-client_secret)

```
$oauthClient = new MailiumOauthClient();
$oauthClient->setClientID("YOUR_CLIENT_ID");
$oauthClient->setClientSecret("YOUR_CLIENT_SECRET");
$oauthClient->setRedirectUri("YOUR_REDIRECT_URI");

// Scopes that your application need
$oauthClient->addScope(MailiumOauthClient::SCOPE_BASIC);
$oauthClient->addScope(MailiumOauthClient::SCOPE_CAMPAIGN_READ);
$oauthClient->addScope(MailiumOauthClient::SCOPE_SUBSCRIBER_LIST_READ);

// Set the callback method to store the oauth token
$oauthClient->setTokenStoreCallbackFunction("storeToken");
```

### Creating authorization URL

[](#creating-authorization-url)

```
$authorizationUrl = $oauthClient->createAuthorizationUrl();
```

### Getting the tokens after receiving the authorization code

[](#getting-the-tokens-after-receiving-the-authorization-code)

```
$oauthClient->authorize($authorizationCode);
```

### Getting Resource Owner

[](#getting-resource-owner)

```
$oauthClient->getResourceOwner();
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~403 days

Total

3

Last Release

2758d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20596368?v=4)[mailium](/maintainers/mailium)[@mailium](https://github.com/mailium)

---

Top Contributors

[![leventogut](https://avatars.githubusercontent.com/u/895636?v=4)](https://github.com/leventogut "leventogut (3 commits)")

---

Tags

oauth-clientmailium

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mailium-oauth-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/mailium-oauth-client-php/health.svg)](https://phpackages.com/packages/mailium-oauth-client-php)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M17](/packages/pantheon-systems-terminus)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9317.2k55](/packages/open-dxp-opendxp)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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