PHPackages                             yasserbelhimer/agora-access-token-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yasserbelhimer/agora-access-token-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yasserbelhimer/agora-access-token-generator
===========================================

RTC Token generator

1.0.0(4y ago)108.8k↓42%1MITPHP

Since Feb 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/yasserbelhimer/agora-access-token-generator)[ Packagist](https://packagist.org/packages/yasserbelhimer/agora-access-token-generator)[ RSS](/packages/yasserbelhimer-agora-access-token-generator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Agora-access-token-generator
============================

[](#agora-access-token-generator)

![Downloads](https://camo.githubusercontent.com/29f0df0fbdf527fa7699848fc3522e4409614b16ae292accf7ae26dc04f5a137/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79617373657262656c68696d65722f61676f72612d6163636573732d746f6b656e2d67656e657261746f722e7376673f7374796c653d666c61742d7371756172652535442829)![Version](https://camo.githubusercontent.com/ae887156208cf7c6a8b5c8e681027bbed4c9c35d96effd17bca771d9d5fc7d17/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79617373657262656c68696d65722f61676f72612d6163636573732d746f6b656e2d67656e657261746f722e7376673f7374796c653d666c61742d7371756172652535442829)![Forks](https://camo.githubusercontent.com/d6fa4ef54ad21ef7b653604a646ce747213a4aba387e20c33736e34223205694/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f79617373657262656c68696d65722f61676f72612d6163636573732d746f6b656e2d67656e657261746f722e7376673f7374796c653d666c61742d7371756172652535442829)![Stars](https://camo.githubusercontent.com/af9e4ddfba7cb1c33bd97777aee023b1ffb216d530b6c45b2b9395f6deb97f2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f79617373657262656c68696d65722f61676f72612d6163636573732d746f6b656e2d67656e657261746f722e7376673f7374796c653d666c61742d7371756172652535442829)![License](https://camo.githubusercontent.com/a8e63e1a1443a7164568a1a184a988a79093935bc872460d0354bf2aff25d87f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f79617373657262656c68696d65722f61676f72612d6163636573732d746f6b656e2d67656e657261746f722e7376673f7374796c653d666c61742d7371756172652535442829)

Simple laravel package to generate access token for RTC agora

Installation, and Usage Instructions
------------------------------------

[](#installation-and-usage-instructions)

This package allows you to generate Agora access token using laravel.

```
composer require yasserbelhimer/agora-access-token-generator

```

First at all generate your APP\_ID and APP\_CERTIFICATE from agora dashboard

Set AGORA\_APP\_ID and AGORA\_APP\_CERTIFICATE in the .env

```
AGORA_APP_ID= your agora app id
AGORA_APP_CERTIFICATE= your agora certificate token
```

Once installed you can do stuff like this:

To know more about arguments and parametres check Agora documentation.
----------------------------------------------------------------------

[](#to-know-more-about-arguments-and-parametres-check-agora-documentation)

Generate RTC token:
-------------------

[](#generate-rtc-token)

To generate rtc token use the static methode buildTokenWithUserAccount() in RtcTokenBuilder class.

```
    $appID = env('AGORA_APP_ID');
    $appCertificate = env('AGORA_APP_CERTIFICATE');

    $channelName = $request->channelName;
    $user = Auth::user()->name;
    $role = RtcTokenBuilder::RoleAttendee;
    $expireTimeInSeconds = 3600;
    $currentTimestamp = now()->getTimestamp();
    $privilegeExpiredTs = $currentTimestamp + $expireTimeInSeconds;

    $rtcToken = RtcTokenBuilder::buildTokenWithUserAccount($appID, $appCertificate, $channelName, $user, $role, $privilegeExpiredTs);
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1562d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca479317f397ee0ababc740113a215d8807dfffccc2e8ae7e35e391ad77bfa93?d=identicon)[yasserbelhimer](/maintainers/yasserbelhimer)

---

Top Contributors

[![yasserbelhimer](https://avatars.githubusercontent.com/u/56972095?v=4)](https://github.com/yasserbelhimer "yasserbelhimer (2 commits)")

### Embed Badge

![Health badge](/badges/yasserbelhimer-agora-access-token-generator/health.svg)

```
[![Health](https://phpackages.com/badges/yasserbelhimer-agora-access-token-generator/health.svg)](https://phpackages.com/packages/yasserbelhimer-agora-access-token-generator)
```

###  Alternatives

[axios/tools

some tools

271.3k2](/packages/axios-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
