Video Call | Group call |
| |
SDKAppID, SDKSecretKey
, which will be used as Mandatory Parameters in Initialize the TUICallKit.yarn add @tencentcloud/call-uikit-react-native
debug
directory to your project directory src/debug
, it is necessary when generating userSig locally.cp -r node_modules/@tencentcloud/call-uikit-react-native/src/debug ./src
xcopy node_modules\\@tencentcloud\\call-uikit-react\\src\\debug .\\src\\debug /i /e
/src/App.tsx
file.import { TUICallKit, MediaType } from '@tencentcloud/call-uikit-react-native';import * as GenerateTestUserSig from "./debug/GenerateTestUserSig-es"; // Refer to Step 2.2
fill in
SDKAppID, SDKSecretKey
as two parameters in the code.const handleLogin = async () => {const userId = "denny"; // Please replace with your userIdconst SDKAppID = 0; // Please replace with the SDKAppID obtained from step 1const SecretKey = "****"; // Please replace with the SDKSecretKey obtained from step 1const { userSig } = genTestUserSig({ userID: userId, SDKAppID, SecretKey });TUICallKit.login({sdkAppId: SDKAppID,userId,userSig,},(res) => {},(errCode, errMsg) => {});};
Parameter | Type | Note |
userId | String | Unique identifier of the user, defined by you , it is allowed to contain only upper and lower case letters (a-z, A-Z), numbers (0-9), underscores, and hyphens. |
SDKAppID | Number | |
SecretKey | String | |
userSig | String | A security protection signature used for user log in authentication to confirm the user's identity and prevent malicious attackers from stealing your cloud service usage rights. |
genTestUserSig
(Refer to Step 3.2) function in the debug file to generate a `userSig`. In this method, SDKSecretKey is vulnerable to decompilation and reverse engineering. Once your key is leaked, attackers can steal your Tencent Cloud traffic.//【3】Make a 1v1 video callconst call = async () => {await TUICallKit.call({userID: 'mike',type: MediaType.Video,});};
Caller initiates an audio call | Callee receives an audio call request |
| |
Was this page helpful?