Download the PHP package brightleaf-digital/asana-client without Composer

On this page you can find all versions of the php package brightleaf-digital/asana-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package asana-client

Brightleaf Digital Asana API Client for PHP

CI semgrep (php)

A modern, maintained PHP client library for the Asana API.

Common development commands

Motivation

This library was created because the official Asana PHP library is no longer maintained, is outdated, and uses a library with a known security vulnerability. After searching for alternatives, I couldn't find any third-party libraries that appeared to be actively maintained.

Status

This library is currently pre‑v1. Breaking changes may occur between releases while we finalize the public API and internal architecture.

Breaking Changes (v0.x → v0.y)

As we approach v1.0, several foundational changes have been made:

This is my first library of this kind, and I am still developing my skills as a junior developer. Any reviews, comments, contributions, or suggestions are highly welcome - especially since my only peer review so far has been from AI. I would particularly appreciate help with:

OAuth Scopes

This library now supports Asana's new OAuth permission scopes. These scopes provide more granular control over what actions an app can perform following the principle of least privilege and should enhance user trust and so increase app adoption.

Important Notes:

For more information about the new OAuth scopes and implementation details, refer to Asana's announcement and its linked documentation.

Features

API Coverage

This library provides comprehensive coverage of the Asana API, including:

Core Resources

Advanced Features

Quick Examples

Design Decisions

Installation

then use Composer's autoload:

Basic Usage

To get started you need an Asana app configured with a proper redirect URL. You get the client ID and secret from the app. Remember to store them securely! Please read the official documentation if you aren't sure how to set up an app.

Using Personal Access Token (PAT)

Using OAuth 2.0

Token Management and Storage Options

The handleCallback() method returns an AccessToken object, which contains the token itself, its expiry, and a refresh token.

This library provides flexibility in how you manage and store tokens. By default, tokens are automatically persisted to a token.json file in your current working directory.

Built-In Token Storage

The library uses a TokenManager to handle the token lifecycle. When you initialize the client using a static factory method, you can specify how tokens should be stored.

  1. Default File Storage: If no storage is specified, it defaults to ./token.json.
  2. Custom File Path: Pass a string path to use FileTokenStorage at that location.
  3. In-Memory Storage: Pass false to use MemoryTokenStorage (no disk writes).
  4. Custom Implementation: Pass a TokenStorageInterface instance.
Automatic Token Refresh Support

The library automatically handles token refreshes. When a token expires, the client will:

  1. Request a new token from Asana.
  2. Automatically save it to your configured storage (e.g., update the token.json file).
  3. Notify any subscribers.

Flexible Token Handling for Advanced Users

Advanced users can bypass the built-in storage by implementing TokenStorageInterface or by using memory storage (false) combined with subscribeToTokenRefresh() to handle their own persistence (e.g., to a database).

Examples

More examples are available in the examples folder, including:

Documentation Gaps

If you find something that isn't clear from either this library's documentation or the official Asana API documentation, the Asana developer forum is a valuable resource. There are often details or workarounds discussed there that aren't covered in the official documentation.

For example, creating a task in a specific section isn't documented in the API reference but can be found in forum discussions. If you discover such gaps:

  1. Check the Asana Developer Forum
  2. Open an issue in this repository
  3. Feel free to link to relevant forum or Stack Overflow posts

📘 Project Planning and Improvements

This library is actively developed with long-term maintainability in mind.
For design decisions, planned features, and deferred items, see the following documentation:

Have an idea or want to help implement one of these? Open a GitHub issue or submit a pull request.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


All versions of asana-client with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
league/oauth2-client Version ^2.4
guzzlehttp/guzzle Version ^7
psr/log Version ^1.1 || ^2.0 || ^3.0
psr/container Version ^1.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brightleaf-digital/asana-client contains the following files

Loading the files please wait ...