How to use Token generation and verification tools
Introduction
Authentication refers to the operation that checks whether a user has permission to access the system. It can avoid security risks caused by lack of permission control or improper operation. ZEGOCLOUD supports authentication on users through tokens. For more information, see Use Tokens for authentication.
During debugging or integration, you can use the token generation and verification tools in the ZEGOCLOUD Admin Console to generate a temporary token on the server and verify the correctness of the token to avoid security risks caused by the lack of permission control or improper operation.
- To facilitate debugging, you can generate a temporary token in the ZEGOCLOUD Admin Console. However, before your app is brought online, be sure to verify that the token is generated on your own server.
- The ZEGOCLOUD Admin Console supports verification of the tokens generated only by the token03 and token04 plug-ins in zego_server_assistant.
This document describes how to generate a temporary token and verify the correctness of the token by using the tools in the ZEGOCLOUD Admin Console.
Procedure
Generate a temporary token
During debugging, you can use the token generation tool in the ZEGOCLOUD Admin Console to generate a temporary token.
- Log in to the ZEGOCLOUD Admin Console. In the navigation pane on the homepage, choose Development tools > Token tools.

- In the Temporary token generation pane, select the AppID, enter the user ID, and click Generate to generate a temporary token.

- After the token is generated, you can click Copy to copy it to your own code for use.

Verify the token
After the token is generated through your own server, you can use the verification tool to verify its correctness. After you enter the corresponding token in the verification tool pane in the ZEGOCLOUD Admin Console, the ZEGOCLOUD Admin Console performs reverse parsing on this token and provides parsing parameters to help you determine the correctness and safety of the token.
- Log in to the ZEGOCLOUD Admin Console. In the navigation pane on the homepage, choose Development tools > Token tools.

- In the Temporary token verification pane, select the AppID, enter the Token, and click Verify to verify the temporary token.

- After verification, the ZEGOCLOUD Admin Console will parse the parameter information about the token. If the token is correct, the corresponding parsing parameters will be returned. If the token is incorrect, the specific failure cause will be returned. You can determine the correctness and safety of the token you enter based on the parsing result.


