About The Token Generation Explanation
Generation of tk_token
- Information association Need to obtain the following information: companyDomain:Corporate domain name (required) authKey:Corporate key (required) thirdRoomId:Third-party room number (required) userId:User ID (required) ts:Current timestamp (in seconds) (required)
expireTs: Expiration timestamp. The number of seconds elapsed since January 1, 1970, at 00:00:00 UTC. For example, if you want to set the permission to expire 10 minutes after the generation of TK-Sign, you should set the expireTs to the current timestamp plus 600 seconds. If the permission should never expire, please fill in 0.
For the acquisition of the corporate domain name and authKey, please refer to the enterprise management backend to view the enterprise details information
-
aes encryption
signString = "appId=companyDomain&thirdRoomId=thirdRoomId&userId=userId&ts=ts&expireTs=expireTs" tk_token = aes(signString, authKey)
-
Example
1 2 3 4 5 6 7 8 |
|
Usage of the SDK
Only the joinRoomEx method requires the use of tk_token. Simply pass this parameter to the tk_token field within the roomJsonOptions parameter of the method
1 |
|