• Fetch and persist messages from Pinpoint campaigns. Calling this API is necessary to trigger InApp messages on the device.

    Returns Promise<void>

    A promise that will resolve when the operation is complete.

    Throws

    service exceptions - Thrown when the underlying Pinpoint service returns an error.

    Throws

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

    Example

    // Sync InApp messages with Pinpoint and device.
    await syncMessages();