PHPackages                             testmonitor/asana-client - 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. testmonitor/asana-client

ActiveLibrary[API Development](/categories/api)

testmonitor/asana-client
========================

The TestMonitor Asana Client.

v2.1.0(2y ago)28.8k↓50%3MITPHPPHP ^8.1

Since Dec 8Pushed 6mo ago2 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (12)Used By (0)

TestMonitor Asana Client
========================

[](#testmonitor-asana-client)

[![Latest Stable Version](https://camo.githubusercontent.com/a942058c3fd1888cc25139fdb0cc8912eb8a6bf78d5bb0cae21725331bf9edbf/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6173616e612d636c69656e742f762f737461626c65)](https://packagist.org/packages/testmonitor/asana-client)[![CircleCI](https://camo.githubusercontent.com/850c1c09a2747605ae692159b529d00602b3b14cdf909f52d5e0118a8bba437f/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f746573746d6f6e69746f722f6173616e612d636c69656e742e737667)](https://circleci.com/gh/testmonitor/asana-client)[![StyleCI](https://camo.githubusercontent.com/d5053394af71d779db959bb21a0d1a98b4c0147dc3efb91f422c6916d9e01538/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232333033373339372f736869656c64)](https://styleci.io/repos/223037397)[![codecov](https://camo.githubusercontent.com/e862981c5bc5908a5a7368e8bcf22e3070ac19705bcf63f71d56a1963e525cc3/68747470733a2f2f636f6465636f762e696f2f67682f746573746d6f6e69746f722f6173616e612d636c69656e742f67726170682f62616467652e7376673f746f6b656e3d4d4e49384d3435524e31)](https://codecov.io/gh/testmonitor/asana-client)[![License](https://camo.githubusercontent.com/8e2d7f176dabd13f28e00cab4621e421ff0d9e590f37e1cc149d0c3e9eef3a70/68747470733a2f2f706f7365722e707567782e6f72672f746573746d6f6e69746f722f6173616e612d636c69656e742f6c6963656e7365)](https://packagist.org/packages/testmonitor/asana-client)

This package provides a very basic, convenient, and unified wrapper for the [Official Asana PHP client library](https://github.com/Asana/php-asana).

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Tests](#tests)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

To install the client you need to require the package using composer:

```
$ composer require testmonitor/asana-client

```

Use composer's autoload:

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

You're all set up now!

Usage
-----

[](#usage)

This client only supports **oAuth authentication**. You'll need an Asana application to proceed. If you haven't done so, please read up with the [Asana authentication docs](https://developers.asana.com/docs/#authentication-basics) on how to create an application.

When your Asana application is up and running, start with the oAuth authorization:

```
$oauth = [
    'clientId' => '12345',
    'clientSecret' => 'abcdef',
    'redirectUrl' => 'https://redirect.myapp.com/',
];

$asana = new \TestMonitor\Asana\Client($oauth);

header('Location: ' . $asana->authorizationUrl('state'));
exit();
```

This will redirect the user to a page asking confirmation for your app getting access to Asana. Make sure your redirectUrl points back to your app. This URL should point to the following code:

```
$oauth = [
    'clientId' => '12345',
    'clientSecret' => 'abcdef',
    'redirectUrl' => 'https://redirect.myapp.com/',
];

$asana = new \TestMonitor\Asana\Client($oauth);

$token = $asana->fetchToken($_REQUEST['code']);
```

When everything went ok, you should have an access token (available through Token object). It will be valid for **one hour**. After that, you'll have to refresh the token to regain access:

```
$oauth = ['clientId' => '12345', 'clientSecret' => 'abcdef', 'redirectUrl' => 'https://redirect.myapp.com/'];
$token = new \TestMonitor\Asana\Token('eyJ0...', '0/34ccc...', 1574600877); // the token you got last time

$asana = new \TestMonitor\Asana\Client($oauth, $token);

if ($token->expired()) {
    $newToken = $asana->refreshToken();
}
```

The new token will be valid again for the next hour.

Examples
--------

[](#examples)

Get a list of Asana workspaces:

```
$workspaces = $asana->workspaces();
```

Or creating a task, for example (using a example project with gid 12345):

```
$task = $asana->createTask(new \TestMonitor\Asana\Resources\Task([
    'completed' => false,
    'name' => 'Name of the task',
    'notes' => 'Some notes',
]), '12345');
```

Tests
-----

[](#tests)

The package contains integration tests. You can run them using PHPUnit.

```
$ vendor/bin/phpunit

```

Changelog
---------

[](#changelog)

Refer to [CHANGELOG](CHANGELOG.md) for more information.

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

[](#contributing)

Refer to [CONTRIBUTING](CONTRIBUTING.md) for contributing details.

Credits
-------

[](#credits)

- **Thijs Kok** - *Lead developer* - [ThijsKok](https://github.com/thijskok)
- **Stephan Grootveld** - *Developer* - [Stefanius](https://github.com/stefanius)
- **Frank Keulen** - *Developer* - [FrankIsGek](https://github.com/frankisgek)
- **Muriel Nooder** - *Developer* - [ThaNoodle](https://github.com/thanoodle)

License
-------

[](#license)

The MIT License (MIT). Refer to the [License](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance46

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 60.2% 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 ~179 days

Recently: every ~173 days

Total

10

Last Release

735d ago

Major Versions

v1.3.1 → v2.0.02024-04-10

PHP version history (4 changes)v1.0.0PHP ^7.2

v1.2.0PHP ^7.4|^8.0

v1.2.2PHP ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/47f66133b6b4806a16aaed043daa733f5e97adb7a10c9982d01a1cda9f492040?d=identicon)[stefanius](/maintainers/stefanius)

![](https://www.gravatar.com/avatar/39f48c881813b7d3b044ca5660aa5ab9e60b5dd7c34ed4a47acbb11bd20b7593?d=identicon)[thijskok](/maintainers/thijskok)

---

Top Contributors

[![thijskok](https://avatars.githubusercontent.com/u/1344550?v=4)](https://github.com/thijskok "thijskok (68 commits)")[![stefanius](https://avatars.githubusercontent.com/u/2707905?v=4)](https://github.com/stefanius "stefanius (35 commits)")[![Frankisgek](https://avatars.githubusercontent.com/u/487218?v=4)](https://github.com/Frankisgek "Frankisgek (10 commits)")

---

Tags

apiasanaclientclientasanatestmonitor

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/testmonitor-asana-client/health.svg)

```
[![Health](https://phpackages.com/badges/testmonitor-asana-client/health.svg)](https://phpackages.com/packages/testmonitor-asana-client)
```

###  Alternatives

[openai-php/client

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

5.8k22.6M232](/packages/openai-php-client)[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)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69433.0M114](/packages/algolia-algoliasearch-client-php)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[asana/asana

A PHP client for the Asana API

1381.6M4](/packages/asana-asana)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)

PHPackages © 2026

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