logo
On this page

What is Token? How to generate Token? How to use Token?

2021-12-04
Products / Plugins:Video Call / Audio Call / Live streaming
Platform / Framework:iOS / Android / macOS / Windows

Note

This article is for reference on Native platforms only, mainly referring to iOS, Android, macOS, and Windows platforms.

What is Token

Token is an authentication token. When using the SDK, if there are high requirements for business security, you can control the permissions for "logging into a room" and "publishing streams in a room".

Note

Before using Token for user permission control functionality, please contact ZEGOCLOUD Technical Support to configure and enable this feature.

Token Generation and Usage

After enabling the user permission control feature, the developer's server generates a Token. When users log into a room, they pass in the Token and set the corresponding permissions. Through the SDK's transmission, the ZEGO server will verify users with Token. Based on the Token parameters, it determines whether the user can log into a specific room and publish streams in the room.

For specific implementation, please refer to Video Call - User Permission Control.

Token Validity Period

The validity period of Token is set by the developer. For specific implementation, please refer to Video Call - User Permission Control in the "Generate Token" section.

When Token expires, users will not be immediately kicked out of the room, and the currently successfully published streams will not be affected, but it will affect the user's next login and publishing operations. Developers need to obtain a new valid Token from their own server and call the renewToken interface provided by the SDK to update the Token.

API Reference:

Video Call - Using Token Authentication

Previous

What is the difference between ZEGOCLOUD low-latency live streaming and other RTMP + CDN live streaming technology?

Next

How to get a temporary Token for calling ZEGO SDK?

On this page

Back to top