Back to Blog

2-Click Setup: Testing Token Server

2-Click Setup: Testing Token Server

To run a production app using Agora’s Voice and Video SDK, developers need to implement a token server.

This requires efforts on both the front-end and backend. Sometimes when trying to coordinate, the two teams realize they need to develop both in parallel. But how can the front-end get built and tested without a backend?

Luckily some of the great developers in the Agora dev community put together a repo of a NodeJS implementation with a quick setup/deployment button that you can use for testing your front-end implementation. To make things even simpler, I’ve included everything you need below.

Prerequisites

Preparation

Make sure you are logged into your Heroku account and have logged in to your Agora Developer account. You’re also going to need to have an app setup with the App Certificate enabled.

note: enabling App Certificate requires email confirmation

Deployment

Click to start

Fill in your: app name, Agora APP_ID, and APP_CERTIFICATE

Make a cup of coffee and wait for heroku to finish 🙂

Smash that Deploy App button!

Once the server is running you replace <heroku url> below with your instance url and generate tokens using this endpoint.

https://<heroku url>/access_token?channel=test&uid=1234

Thats it

Now your front-end team can add some simple server calls and get the token services running, without dependancy or pressure on the backend team.

Resources

In case you want to check out the code, find the repo below.

Other Resources

RTE Telehealth 2023
Join us for RTE Telehealth - a virtual webinar where we’ll explore how AI and AR/VR technologies are shaping the future of healthcare delivery.

Try Agora for Free

Sign up and start building! You don’t pay until you scale.
Try for Free
Get Started with Agora thumbnail