larastuffs/vidyo-token is a Laravel package for generate access tokens for vidyo.io.
It currently has 1 GitHub stars and 2.100 downloads on Packagist (latest version 1.0.1).
Install it with composer require larastuffs/vidyo-token.
Discover more Laravel packages by larastuffs
or browse all Laravel packages to compare alternatives.
Last updated
Generate access tokens for Vidyo.io.
To connect to Vidyo.io, the VidyoClient SDK needs to pass a token. A token is a short-lived authentication credential that grants access to the Vidyo.io service on behalf of the developer to a specific user. When an endpoint requests access to the service, your application backend should generate a token and pass it on to the client application.
You can install this package via composer using:
composer require larastuffs/vidyo-token
To publish the config file to config/vidyo.php run:
php artisan vendor:publish --provider="LaraStuffs\VidyoToken\VidyoTokenServiceProvider"
Go to config/vidyo.php and change the value of developer_key and app_id for your developer key and application ID.
You can use the static method LaraStuffs\VidyoToken\VidyoToken::generate(string $username = null, int $seconds = null): string to generate the token.
If the arguments are null, the method gets the values defined in config/vidyo.php.
<?php
use LaraStuffs\VidyoToken\VidyoToken;
$username = 'LaraStuffs';
echo VidyoToken::generate($username);
// Result: cHJvdmlzaW9uAExhcmFTdHVmZnNAADYzNzU5...
Contributions are more than welcome. Fork, improve and make a pull request. For bugs, ideas for improvement or other, please create an issue.