A PHP library for obtaining Trustpilot Business User API access tokens.
Install using composer:
composer install itspirit/trustpilot-authenticator
$authenticator = new Trustpilot\Api\Authenticator\Authenticator($apiKey, $apiToken, $username, $password);
$accessToken = $authenticator->getAccessToken();
// $accessToken->getToken(): string
// $accessToken->hasExpired(): bool
// $accessToken->getExpiry(): \DateTimeImmutable
// $accessToken->serialize(): string
This package use Codeception for testing. To run the tests just type
vendor/bin/codecept run