So, I get this a lot from providers asking if I'm a cop when I call or text them. I hope everybody knows this is an urban legend.
Police do not have to say yes if asked in a situation like this, really in any situation. Once they are identified and you ask for their badge number technically they have to give it to you but that's only when they are already identified as police...and most won't give it to you regardless with 0 recourse.
It's just common sense, if that were the case it would ruin every undercover, sting or plain clothes operation. Police CAN and WILL lie to you to make the bust and it's perfectly legal. However, the LEO check is fairly accurate and useful for a number of reasons.
Just an FYI if any girls or guys rely on asking if the other person is a cop.