The first vending machine was created in Egypt around 215 BC. It dispensed holy water when a coin was inserted into the slot.