PHPackages                             justijndepover/teamleader-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. [API Development](/categories/api)
4. /
5. justijndepover/teamleader-api

ActiveLibrary[API Development](/categories/api)

justijndepover/teamleader-api
=============================

PHP Client for the Teamleader API

0.8.0(2y ago)71.1k[2 issues](https://github.com/justijndepover/teamleader-api/issues)MITPHP

Since Mar 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/justijndepover/teamleader-api)[ Packagist](https://packagist.org/packages/justijndepover/teamleader-api)[ RSS](/packages/justijndepover-teamleader-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (0)

Teamleader API
==============

[](#teamleader-api)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4cdfbc1714b5a14e52b5367bbcfad8ac5fc34f73b6f9d683363b60b64384da41/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a757374696a6e6465706f7665722f7465616d6c65616465722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justijndepover/teamleader-api)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/13577cdc7f88cae80654edb5a9b83328bc10d8f77b15ff74d71893812ccc9a79/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a757374696a6e6465706f7665722f7465616d6c65616465722d6170692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/justijndepover/teamleader-api)

PHP Client for the Teamleader API

[![Logo](https://raw.githubusercontent.com/justijndepover/teamleader-api/master/docs/logo.jpg)](https://raw.githubusercontent.com/justijndepover/teamleader-api/master/docs/logo.jpg)

Caution
-------

[](#caution)

This application is still in development and could implement breaking changes. Please use at your own risk.

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

[](#installation)

You can install the package with composer

```
composer require justijndepover/teamleader-api
```

Installing the package in Laravel
---------------------------------

[](#installing-the-package-in-laravel)

To use the plugin in Laravel applications, please refer to the [Laravel usage page](docs/laravel-usage.md)

Usage
-----

[](#usage)

Connecting to Teamleader:

```
// note the state param: this can be a random string. It's used as an extra layer of protection. Teamleader will return this value when connecting.
$teamleader = new Teamleader(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, STATE);
// open the teamleader login
header("Location: {$teamleader->redirectForAuthorizationUrl()}");
exit;
```

After connecting, Teamleader will send a request back to your redirect uri.

```
$teamleader = new Teamleader(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, STATE);

if ($_GET['error']) {
    // your application should handle this error
}

if ($_GET['state'] != $teamleader->getState()) {
    // state value does not match, your application should handle this error
}

$teamleader->setAuthorizationCode($_GET['code']);
$teamleader->connect();

// store these values:
$accessToken = $teamleader->getAccessToken();
$refreshToken = $teamleader->getRefreshToken();
$expiresAt = $teamleader->getTokenExpiresAt();
```

Your application is now connected. To start fetching data:

```
$teamleader = new Teamleader(CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, STATE);
$teamleader->setAccessToken($accessToken);
$teamleader->setRefreshToken($refreshToken);
$teamleader->setTokenExpiresAt($expiresAt);

// fetch data:
$teamleader->crm->get();

// you should always store your tokens at the end of a call
$accessToken = $teamleader->getAccessToken();
$refreshToken = $teamleader->getRefreshToken();
$expiresAt = $teamleader->getTokenExpiresAt();
```

Available methods
-----------------

[](#available-methods)

Note that your application should have the correct scopes enabled inside the [integration](https://marketplace.focus.teamleader.eu/be/nl/ontwikkel/integraties)

This application is in an early development stage. Therefore not all resources are available as props yet. (for example: `$teamleader->users->me`) In the meantime it's possible to fetch every resource available through the `get` and `post` methods:

```
$teamleader->get('users.me');
$teamleader->get('departments.list');
$teamleader->get('departments.info', ['id' => $id]);
$teamleader->post('contacts.add', [
    // all the data
]);
```

Rate limiting
-------------

[](#rate-limiting)

After each request, the rate limiting headers are available.

```
// returns the maximum rate limit your application can hit in 1 minute
$teamleader->getRateLimitLimit();

// returns the current limit remaining
$teamleader->getRateLimitRemaining();

// returns the datetime (UTC) when your application can make calls again, after hitting the rate limit.
$teamleader->getRateLimitReset();
```

How you handle rate limiting is up to you. But the application provides a helper method to ensure you never hit the limit:

```
$teamleader->get('contacts.info', ['id' => $id]);
// executing this function will sleep until the X-RateLimitReset header has passed, but only if the rate limit is hit.
$teamleader->ensureRateLimitingIsNotExceeded();
```

Security
--------

[](#security)

If you find any security related issues, please open an issue or contact me directly at [justijndepover@gmail.com](justijndepover@gmail.com).

Contribution
------------

[](#contribution)

If you wish to make any changes or improvements to the package, feel free to make a pull request.

License
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.7% 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 ~158 days

Recently: every ~256 days

Total

8

Last Release

768d ago

### Community

Maintainers

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

---

Top Contributors

[![justijndepover](https://avatars.githubusercontent.com/u/9008623?v=4)](https://github.com/justijndepover "justijndepover (22 commits)")[![timdegroote](https://avatars.githubusercontent.com/u/1674142?v=4)](https://github.com/timdegroote "timdegroote (1 commits)")

---

Tags

apioauth2phpteamleaderphpapiTeamleader

### Embed Badge

![Health badge](/badges/justijndepover-teamleader-api/health.svg)

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

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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