In this paper, we consider the 1D wave equation where the spatial domain is a bounded interval. Assuming the initial conditions to be known, we are here interested in identifying an unknown source term, while we take the Neumann derivative of the solution on one of the boundaries as the measurement output. Applying a back-and-forth iterative scheme and constructing well-chosen observers, we retrieve the source term from the measurement output in the minimal observation time. We further provide an extension of the method to the case of wave equations with N dimensional spatial domain.