This is an example of a simple Node/Express server that generates a token for Agora applications.
Install the dependencies
npm install
Start the service
npm start
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":" "}