Solomon was one of only a handful of men in the Old Testament that the LORD appeared to. Typically, God delivered his messages through prophets and occasionally through angels, but for his most important messages, the LORD delivered them personally. It says in 1 Kings 9:2 “that the LORD appeared to Solomon the second time, as he had appeared unto him at Gibeon.” “In Gibeon, the LORD appeared to Solomon in a dream by night” (1 Kings 3:5). The word translated appeared, ra’ah basically connotes seeing with one’s eyes, but it can also represent perception in the sense of hearing something (7200). Whether or not he saw the LORD in a physical form is not clear, but Solomon knew without a doubt it was the LORD speaking to him.
Because the LORD told Solomon directly what he expected of him, Solomon was accountable for his behavior. The LORD said to Solomon, “if thou wilt walk before me, as David thy father walked, in integrity of heart, and in uprightness, to do according to all that I have commanded thee, and wilt keep my statutes and judgments: then I will establish the throne of thy kingdom upon Israel for ever as I promised to David thy father, saying, There shall not fail thee a man upon the throne of Israel” (1 Kings 9:4-5).