Really basic here. Hotels want to provide the best customer support possible but within policy area. There are a few gray areas you can use to get what you want. My favorite is the fact that many hotels 'discourage' giving out keys but they aren't really prohibited. What I mean is, say you talk to someone in the elevator. Find some basic personal info. Most important would be name and room number, next is where they live, then anything else is icing on the cake. Now what you do is head down to the front desk. A male is actually more likely to do this than a female in my experience so if possible try it when a guy is at the counter. Ask him something like "I left my <important item> in my <fake relation>'s room. They are in room <their room num>" I use wallet for fake item to explain why I dont have the key and for the relationship say father, uncle, grandmother, etc. Whatevet fits best based on the age gap of the target. Now they should ask what the person's first and last name is, and possibly where they are from. If you learnt the correct info, present jt. They should give you a key to the room.
Note: Sometimes they won't give it to you. Just don't ask the same person because they will get suspicious. I've only had a 50% success rate or so, due to it being very frowned upon to do. I only do this to screw with my relatives but you can see how this can be used to rob someone blind.