Updated on 2024-07-30 GMT+08:00

Login Using an Account and Password

Description

This API is used to log in to the system using an account. APIs such as CreateConf can be called only when you have logged in. To use complete meeting functions, log in to the Huawei Cloud Meeting server first.

If you have not logged in, you can only join created meetings.

Service Process

If you need to log in using the SDK, call the login API and then implement the callback.

  1. Call the API.

    1. Obtain the account and password for login.
    2. Call the login API to log in. The data in the preceding step is used as input parameters.

  2. Implement the callback.

    Implement the callback.

Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
/// Login
/// It is recommended that accounts and passwords used for authentication be stored in ciphertext in the configuration file or as environment variables and be decrypted during usage.
- (void)login {
    NSString *account = getAccount();
     NSString *password = getPassword();
    [[HWMSdk getOpenApi] login:account password:password callback:^(NSError * _Nullable error, HWMLoginResult * _Nullable result) {
        if (error == nil) {
            NSLog(@"Login succeeded.");
        }else{
            NSLog(@"Login failed.");
        }
    }];
}