Numbers 23:17

And when he came to him, behold, he stood by his burnt offering, and the princes of Moab with him. And Balak said unto him, What hath the Lord spoken?

Cross-reference

In Numbers 23:26, Balaam restates his obligation to speak only God's word — directly echoing the premise of Balak's question here.