Skip to content

jiyang666/agora

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

声网token生成和接口管理

使用

composer require jiyang-soft/agora

配置文件

    new \Wu\Agora\Config($_ENV['APP_ID'], $_ENV['APP_CERTIFICATE'], $_ENV['CUSTOMER_KEY'], $_ENV['CUSTOMER_SECRET']);

生成token

$channelName = "hdkhfdkasjhfakhf";
$uidOrAccount = "1234567";
$role = AccessToken::RoleAttendee;
$time = \Wu\Agora\Tool::time()->timestamp + 100;
$tokenModel = new \Wu\Agora\Token\TokenBuilder($this->getConfig());
$res = $tokenModel->buildToken($channelName, $uidOrAccount, $role, $time);

接口管理

$model = new Project($this->getConfig());

About

agora api and token

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%