To go see the king, go on to www.tamatown.com. Enter with your tamagotchi username. (NOT TAMATALK, Tamagotchi Toy Username). Go to the king's tower (northern), and then you can put in the code. There is a ring you can type into your tamagotchi toys.
Hope this helps,
xox_Jaade