The earliest known reference to a vending machine is in the work of Hero of Alexandria, an engineer and mathematician in first-century Roman Egypt. This machine took coins and sold water. The modern models appeared at the beginning of the 1880s. They sold postcards, envelopes, and post stamps. The left photo shows the 1904 model.