Originally posted by realXCV:
If you open a save game that is before the first time you opened the medallion (if you opened it at least once), opening it will generate a new code which won't work with your current game. You should go directly to Spire, open the medallion and take a picture. Then, go back to the door and use that code.
You can also use Revelation Editor
to see your current code or to generate a new one.
If you never opened the medallion, the default code is red-red-red-red-red-red.