Scenario 2: Joining a Meeting After Authentication
Description
If you want to join a meeting after login, perform app ID authentication to obtain a token, call the joinConf API of the SDK, and listen to the join_conf_result event.

- Joining a meeting after authentication: Log in to the system and then join a meeting.
- Joining a meeting anonymously: Join a meeting without authentication.
- The token field in the joinConf API is optional. If the token field is not carried, you will join the meeting anonymously.
Service Process
- Call an API.
- Obtain an access token based on the app ID and key.
- For details about app ID authentication, see Introduction to App ID Authentication in Developer Guide.
- For details about the REST API for obtaining an access token, see Authenticating an App ID.
- Use the obtained access token as the input parameter of the joinConf API of the SDK. (The parameter name is token.)
You can obtain the access token only by calling the REST API in the backend. If you call the REST API in the browser foreground, a CORS error will occur.
- Obtain an access token based on the app ID and key.
- Implement the callback function.
Implement the join_conf_result function.
Sample Code
1 2 3 4 5 6 7 |
HWMeeting.joinConf({confId, pwd, nickName, token}).then(() => { // API called. ... }).catch((e) => { // API calling failed. ... }) |

The sample code in the typical scenario and API reference is pseudo code and cannot be directly used.
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.
For any further questions, feel free to contact us through the chatbot.
Chatbot