Also speakeasy. From prohibition days, a sliding door that allowed a potential customer to be observed, or give some codeword, before admitting them. I actually had one in the E&D in a prison, a sliding window that allowed the person outside to be identified before admitting them by lifting a bar. But I just called it a sliding window, because speakeasy would certainly not fit that context.
When I lived in Florida we had a snazzy one that magnified the image so you didn't have to put your eye to the peephole. If there's backlighting from the inside (common when the front door leads onto a hallway that leads onto a living room with BIG Florida sliding glass doors) you can tell from the outside when someone puts their eye to the peephole. The magnifier kept that from happening.
The original, supposedly official term is door viewer. The more universal term that most people recognize is as already answered above. The one I bought for my door, the packaging was door viewer. I think that's an odd term because it sounds more like a process or device for looking at doors.
Was it hard to find in the store? 'I need a peephole.' 'A what?' 'A peephole. do you have em?' 'We got door viewers?'