This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

Authot Client

v0.3.0 2017-04-11 15:36 UTC

This package is not auto-updated.

Last update: 2021-10-20 06:32:26 UTC


This package wraps Auhtôt API into a PHP client. Oauth2 implementation is provided.


To install, use composer:

composer require libcast/authot-client


// Http client
$httpClient = new \GuzzleHttp\Client([
    'base_uri' => ''

// Oauth2 provider
$provider = new \Libcast\OAuth2\Client\Provider\Authot([
    'clientId'          => '{authot-client-id}',
    'clientSecret'      => '{authot-client-secret}',
    'redirectUri'       => '',

// Create the client
$client = (new \Libcast\Authot\Oauth2\ClientFactory($httpClient, $provider))

// Submit a transcription
$transcription = $client->createWithCallback('/path/to/audio/file.mp3', 'fr', '');

// Fetch a transcription by its ID
$transcription = $client->find(42647);

echo $transcription->getId();
echo $transcription->getLang();
echo $transcription->getProgress();
echo $transcription->getStatus();
echo $transcription->getTitle();
echo $transcription->isFinished();

// Get User time left
$userTimeLeft = $client->getUserTimeLeft();
echo $userTimeLeft->getTimeLeftCorrection()->format('H:i:s');
echo $userTimeLeft->getTimeLeftTranscription()->format('H:i:s');

// Export a subtitle
$subtitle = $client->export(42647, 'srt'); // Available formats: txt, xml, sjson, srt, webvtt
file_put_contents('/path/to/output/', $subtitle);


The MIT License (MIT). Please see License File for more information.