Can’t remember where I first heard but in the 18th century in England they had wooden cat gin vending machines. You walk up, say a magic phrase, put a coin in and it would pour gin through its paw. This was apparently a way to skirt a licensing law.
The first vending machine was actually first century and dispensed holy water. It was actually mechanized similarly to pre-electronic vending machines. https://www.logicvending.co.uk/history-vending-machines