Celebrim
Legend
I've been in games where the gate guard would have called in the entire militia, and sounded the alarm, if the players had answered like that. This is where reasonableness should come in. It makes the game more interesting if every NPC is not out to screw the players over.
That's the point where I run a diplomacy roll as a reaction check. Depending on PC making the roll and the results you could get everything from an apology by the NPC for asking (the Knight Templar on a roll of 6 or better), to refusing to open the gates and calling out other gaurds as a precaution (the Hobgoblin with the 'Cluelessness' disadvantage rolls an 8 or worse). One of the prior PC's actually would have been at risk of having crossbow bolts come his way on a bad roll.
Note that the situation changes significantly if it is say a hobgoblin town or elven town.