Skip to content

Latest commit

 

History

History

AgoraTokenServer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

How to use

Fill in your vendor information

Open TokenServer.js and replace and with your value

// Fill the appID and appCertificate key given by Agora.io
var appID = "<YOUR APP ID>";
var appCertificate = "<YOUR APP CERTIFICATE>";

Install Dependencies and Run

npm i
node TokenServer.js

Expose local web server

You can use ngrok for exposing local web server to the internet. The following command will share your local web server

ngrok http 8080

Generate Token

Generate RTC Token

curl [server_url]/rtcToken?channelName=test

Generate RTM Token

curl [server_url]/rtmToken?account=testAccount