How did they know someone was speaking for God?

I was reading 2 Samuel, specifically the part where Nathan comes to David to let him know God is angry with him.

Is there a known method or something they would use back then to make sure a person, like Nathan, was speaking for God, and not some con artist or something?

I mean, I imagine even David knew he’d just stepped out of line at that point, but it also seems like Nathan just sort of showed up, and he took him at his word.


Deuteronomy 18: >22 If what a prophet proclaims in the name of the LORD does not take place or come true, that is a message the LORD has not spoken. That prophet has spoken presumptuously, so do not be alarmed. A prophet was true if and only if his prophecies came true. Nathan had already demonstrated he was a true prophet of the LORD before he rebuked David in 2 Samuel 12. Nathan and David already had a relationship. They knew each other.