Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agora-access-token

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agora-access-token

```shell npm i agora-access-token ```

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
15K
decreased by-0.41%
Maintainers
1
Weekly downloads
 
Created
Source

How to use

Install

npm i agora-access-token

Import

const {AccessToken} = require('./index')
const {Token, Priviledges} = AccessToken

Generate

var appID = "<Your app ID>";
var appCertificate = "<Your app certificate>";
var channel = "<The channel this token is generated for>";
var uid = <The uid this token is generated for>;

// expire timestamp, 0 indicates never expire - note a key is valid for 24 hours maximum
var expireTimestamp = 0;

var key = new Token(appID, appCertificate, channel, uid);
key.addPriviledge(Priviledges.kJoinChannel, expireTimestamp);

var token = key.build();

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc