In ancient times how did they prevent people from misrepresenting themselves (e.g. "Hello, I am the king of Someplace You Never Heard Of") and commiting fraud?

And even earlier in Douglas Fairbanks’ 1924 Thief of Bagdad

Also the original fairytale of Puss in Boots. No genie, but a hyper-competent cat.