Skip to main content
This API is supported from moengage_flutter version 6.1.0 and is only available for the Android platform and it will throw UnImplementedError error in other platforms
deleteUser() is deprecated. Client-side user deletion will be removed in moengage_flutter 12.0.0. To delete a user, use the following flow:
  1. Register an onLogoutComplete listener using _moengagePlugin.setLogoutCompleteCallbackHandler(listener).
  2. Log the user out on the device by calling _moengagePlugin.logout().
  3. Invoke the MoEngage server-to-server Delete User API from your backend within the onLogoutComplete callback.
The server-to-server deletion must be initiated only after the onLogoutComplete callback is received. If a user is deleted while the SDK still retains their identity, the SDK may continue to send data for that user.
To delete the current user from the MoEngage server use the deleteUser() method as shown below, where you will get an instance of UserDeletionData.
For more information, please refer to the API documentation.