/Agora-Node-TokenServer

A simple token server for Agora applications using NodeJS with Express, and Agora Access Token modules.

Primary LanguageJavaScriptMIT LicenseMIT

Agora Node Token Server

This is an example of a simple Node/Express server that generates a token for Agora applications.

Run the server

Install the dependencies

npm install

Start the service

npm start

Generate the Token

The endpoint generates a token uisng: channelName (String) , the uid (Int), and a role ('subscriber' or 'publisher'). (optional) Pass expirationTime (integer) to represent the token lifetime in seconds.

endpoint structure

?channelName=&uid=&role=&expireTime=

response:

{"token":" "}