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.3k↓16.7%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 1mo 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

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 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

1177d 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

[kbsali/redmine-api

Redmine API client

4221.1M24](/packages/kbsali-redmine-api)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[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)[prokerala/astrology-sdk

Prokerala.com Astrology API Client Library for PHP.

2610.0k](/packages/prokerala-astrology-sdk)[luzrain/telegram-bot-api

PHP Wrapper for Telegram Bot API

1032.8k1](/packages/luzrain-telegram-bot-api)

PHPackages © 2026

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