PHPackages                             sumocoders/teamleader-oauth2 - 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. sumocoders/teamleader-oauth2

ActiveLibrary[API Development](/categories/api)

sumocoders/teamleader-oauth2
============================

PHP Teamleader oauth2 package to connect with Teamleader API (https://developer.teamleader.eu/)

v1.1.0(3y ago)32.5k↑23.3%BSD-2-ClausePHPPHP ^7.4 || ^8.1

Since Nov 18Pushed 2y ago3 watchersCompare

[ Source](https://github.com/sumocoders/teamleader-oauth2)[ Packagist](https://packagist.org/packages/sumocoders/teamleader-oauth2)[ RSS](/packages/sumocoders-teamleader-oauth2/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (7)Used By (0)

Teamleader oauth2
=================

[](#teamleader-oauth2)

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

[](#installation)

`composer require sumocoders/teamleader-oauth2`

Setup
-----

[](#setup)

This package uses PSR-17 and PSR-18. You can use any implementation you want.

For saving the access we provide a TokenStorageInterface, where you'll need to implement storing and fetching of the tokens:

```
interface TokenStorageInterface
{
    public function getTokenType(): string;
    public function getAccessToken(): ?string;
    public function getRefreshToken(): ?string;
    public function isExpired(): bool;
    public function storeTokens(array $tokens): void;
}
```

Look at the [default token storage class](https://github.com/sumocoders/teamleader-oauth2/blob/main/src/Storage/FilesystemTokenStorage.php) how you can make your own implementation.

The Teamleader class will need a clientId and clientSecret. Which you'll need to obtain at the [Teamleader marketplace](https://marketplace.teamleader.eu/).

Usage
-----

[](#usage)

To obtain an access token you'll need to call:

```
$teamleader->acquireAccessToken($redirectUrl, $code);
```

Where `$redirectUrl` is the url you want Teamleader to come back to after Oauth2 authentication and `$code` is for the return when Teamleader comes back to your site and validate the authentication.

After that you can use the Teamleader class to make calls to the Teamleader API. When the access token is expired the Teamleader class will automatically refresh the token.

Getting data
------------

[](#getting-data)

```
$teamleader->get('users.me');
$teamleader->get('departments.list');
$teamleader->get('companies.list');
```

Posting data
------------

[](#posting-data)

```
$teamleader->post(
    'contacts.add',
    [
        'first_name' => 'John',
        'last_name' => 'Doe',
    ]
);
$teamleader->post(
    'contacts.update',
    [
        'id' => 'xxx',
        'first_name' => 'John',
        'last_name' => 'Doe',
        'emails' => [
            ['type' => 'primary', 'email' => 'john@doe.com'],
        ],
    ]
)
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 50% 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 ~44 days

Total

3

Last Release

1230d ago

PHP version history (2 changes)v1.0.0PHP ^7.4

v1.1.0PHP ^7.4 || ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0afcdc0a47a32db64cc2e4c3b4cf59a5e283040d6e9f34284933394c24841f68?d=identicon)[tijsverkoyen](/maintainers/tijsverkoyen)

![](https://www.gravatar.com/avatar/179d3921ac9d44fa878e41369464e08f45f322cde7fcc6d3764dc7268f25e0b7?d=identicon)[sanderdlm](/maintainers/sanderdlm)

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

---

Top Contributors

[![jonasdekeukelaere](https://avatars.githubusercontent.com/u/4092903?v=4)](https://github.com/jonasdekeukelaere "jonasdekeukelaere (2 commits)")[![tijsverkoyen](https://avatars.githubusercontent.com/u/250042?v=4)](https://github.com/tijsverkoyen "tijsverkoyen (2 commits)")

---

Tags

oauth2teamleader

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sumocoders-teamleader-oauth2/health.svg)

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M85](/packages/mollie-mollie-api-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M50](/packages/getbrevo-brevo-php)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

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