assoconnect/mapbox-token

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP client for Mapbox Token API

Maintainers

👁 sylfabre

Package info

github.com/assoconnect/mapbox-token

pkg:composer/assoconnect/mapbox-token

Statistics

Installs: 8 358

Dependents: 0

Suggesters: 0

Stars: 4

Open Issues: 0

v1.0.0 2026-02-14 15:09 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT bbf8838c2a656f89ca8fd5c7dc4166826d1bcebb

This package is auto-updated.

Last update: 2026-04-17 23:22:11 UTC


README

PHP client for Mapbox Token API

👁 Build Status
👁 Quality Gate Status

The following feature of the Mapbox API are implemented:

  • creation of a temporary token

Feel free to submit a PR or contact us if you need a missing feature.

The package uses Guzzle as an HTTP client.

Installation

This package can be install with composer

composer require assoconnect/mapbox-token

Usage

<?php

$guzzle = new GuzzleHttp\Client();
$client = new AssoConnect\MapboxToken\Client('YOUR MAPBOX USERNAME', 'YOUR MAPBOX TOKEN', $guzzle);

// Create a temporary token
$scopes = [
 'styles:read',
 'styles:tiles',
 'fonts:read',
 'datasets:read',
 'uploads:write',
 'uploads:read',
 'tokens:write',
];

$expires = new \DateTime('+ 1 hour');

$client->createTemporaryToken($scopes, $expires)->token; // New temporary Mapbox token