Logout
To disconnect a user (say that you’re for instance logging out and logging in as someone new) you can call the logout() method.
Steps to logout User
- Use the
logout()function provided by thelmFeedClientobject created earlier. - Create an instance of
LogoutRequest, as shown in the snippet and pass it to the above method. - Use the response as per your requirement
try {
const logoutRequest = LogoutRequest.builder()
.setDeviceId("<ENTER_DEVICE_ID>") // unique id of the device
.build();
const response = await lmFeedClient.logout(logoutRequest);
// Use the response as per your requirement.
} catch (error) {
// Use the error as per your requirement.
}
Models
LogoutRequest
| VARIABLE | TYPE | DESCRIPTION | OPTIONAL |
|---|---|---|---|
deviceId | string | Unique id of the device. | ✔ |