Leave Conversation
Product deprecation notice
Effective April 30th, 2026, Vonage In-App Messaging will no longer be available. Access for new users will be closed, and the service will be discontinued for all existing users.
If you have any questions regarding this product’s discontinuation, please contact your account manager or our support team.
This guide covers the process of leaving a conversation.
NOTE: A step-by-step tutorial to build a chat application is available here.
Given a conversation you are already a member of, you can stop being an active member of it by leaving the conversation:
conversation.leave()
conversation.kick("memberId", object : NexmoRequestListener<Any> {
override fun onSuccess(p0: Any?) {
Log.d("TAG", "User kick success")
}
override fun onError(apiError: NexmoApiError) {
Log.d("TAG", "Error: Unable to kick user ${apiError.message}")
}
})
conversation.kick("memberName", new NexmoRequestListener<Void>() {
@Override
public void onSuccess(@Nullable Void aVoid) {
Log.d("TTAG", "User kick success");
}
@Override
public void onError(@NonNull NexmoApiError apiError) {
Log.d("TTAG", "Error: Unable to kick user " + apiError.getMessage());
}
);
conversation.leave({ (error) in
if let error = error {
NSLog("Error leaving conversation: \(error.localizedDescription)")
return
}
NSLog("Conversation left.")
})
[self.conversation leave:^(NSError * _Nullable error) {
if (error) {
NSLog(@"Error leaving conversation: %@", error);
return;
}
NSLog(@"Conversation left.");
}];