PHP code example of zoelabz / agora-token-generator
1. Go to this page and download the library: Download zoelabz/agora-token-generator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zoelabz / agora-token-generator example snippets
$config = [
'debug' => true,
'id' => 'your id',
'secret' => 'your secret',
];
$agora = new \Zoelabz\Agora\Agora($config);
var_dump($agora->project->all()); //
var_dump($agora->usage->get('2021-1-21','2021-1-22',['appid'])); //
var_dump($agora->kicking_rule->all()); //
var_dump($agora->token->buildToken('channel','uid')); // token