Amplify JS API Documentation
    Preparing search index...
    • Registers a callback that will be invoked on messageReceived events.

      Parameters

      • input: OnMessageInteractionEventHandler

        The input object that holds the callback handler.

      Returns EventListenerRemover

      • An object that holds a remove method to stop listening to events.

      AWS will end support for Amazon Pinpoint on October 30, 2026.

      validation: InAppMessagingValidationErrorCode - Thrown when the provided parameters or library configuration is incorrect, or if In App messaging hasn't been initialized.

      onMessageReceived((message) => {
      // use the message
      console.log(message.id);
      });