EducationTokenBuilderSample.php 671 B

12345678910111213141516171819
  1. <?php
  2. include("../src/EducationTokenBuilder.php");
  3. $appId = "970CA35de60c44645bbae8a215061b33";
  4. $appCertificate = "5CFd2fd1755d40ecb72977518be15d3b";
  5. $expire = 600;
  6. $roomUuid = "123";
  7. $userUuid = "2882341273";
  8. $role = 1;
  9. $token = EducationTokenBuilder::buildRoomUserToken($appId, $appCertificate, $roomUuid, $userUuid, $role, $expire);
  10. echo 'Education room user token: ' . $token . PHP_EOL;
  11. $token = EducationTokenBuilder::buildUserToken($appId, $appCertificate, $userUuid, $expire);
  12. echo 'Education user token: ' . $token . PHP_EOL;
  13. $token = EducationTokenBuilder::buildAppToken($appId, $appCertificate, $expire);
  14. echo 'Education app token: ' . $token . PHP_EOL;
  15. ?>