Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 29, 2024

Clear messages

Once messages have been synced to your user’s device, InAppMessaging.clearMessages() can be used to clear the synced messages.

1await InAppMessaging.clearMessages();

NOTE: If your app has authentication implemented, we recommend calling InAppMessaging.clearMessages() in between user log-ins to remove messages targeted for specific user segments. This is especially important if you anticipate your application will be used in shared device scenarios.