It all depends on what key you're talking about. If it's rotom's secret key, then you can get it on wifi mystery gift.
You have to get the key from the wind works and then you could open it.
Because the key to open the door is hidden in the Pokemon Mansion.
go to Pokemon mansion go though it there will be a secret key
You have to defeat a certain Team Rocket Agent and he'll drop the Card Key.
i have a 528i and the doors wont open with the keys how can i get the door open
Pokemon event
In Pokemon Platinum you dont get the key from a grunt you get from the detective, before getting the key you have to go talk to prof. rowan in the library .
go on Pokemon Platinum Walkthrough you'll might get the idea.
It opensa secret door in the Eterna Galactic building where you can change rotoms forme.
in some dungeons there will be doors you use the key on the doors while facing them
You can only get the secret key in Pokemon Platinum
its easy but hard