Updated on 2024-07-30 GMT+08:00
Scenario 11: Logout
Description
You can call this API to log out of Huawei Cloud Meeting.
Service Process
When using the SDK to log out, call the logout API and implement the API callback function onLogoutResult.
- Call the API.
- Assemble the API callback function onLogoutResult.
- Call the Logout API to log out. The data in the preceding step is used as input parameters.
- Implement the callback function.
Implement the onLogoutResult function.
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
/** * Log out. */ async Logout(){ const apiService = new ApiService(); let setResult = await apiService.logout(); if(setResult.ret === 0){ console.log("logoutresult:", setResult.logoutResult); window.sessionStorage.setItem("confListInfo", ""); this.props.history.push('/'); }else{ window.electron.ipcRenderer.send("show-error-alert", "logout error = " + setResult.ret); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
/** * Definition of logout API in ApiService */ async logout() { return new Promise((resolve) => { let resultCallback = (ret, reason, logoutResult) => { console.log("logout, out data = ", { ret, reason, logoutResult }); resolve({ ret, reason, logoutResult }); }; console.log("logout, in param = "); this.uisdkService.getLoginApi().logout(resultCallback); }); } |
Parent topic: Typical Scenarios
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot