Numbers 22:18-20
22:18 Balaam replied to the servants of Balak, “Even if Balak would give me his palace full of silver and gold, I could not transgress the commandment of the Lord my God to do less or more.
22:19 Now therefore, please stay the night here also, that I may know what more the Lord might say to me.”
22:20 God came to Balaam that night, and said to him, “If the men have come to call you, get up and go with them; but the word that I will say to you, that you must do.”
Numbers 22:35
22:35 But the angel of the
Lord said to Balaam, “Go with the men, but you may only speak
the word that I will speak to you.”
So Balaam went with the princes of Balak.