The account may be read here. Angels are authorized to speak in behalf of God. In fact, the Hebrew word for angel is synonymous with “messenger.” And in the account cited the angel was obviously representing God, not himself.
There is another account in Genesis the 18th chapter where three angels visited Abraham and his wife. Recognizing them as messengers of God Abraham even addressed them as “Jehovah.” In fact, the 13th verse says that “Jehovah said to Abraham.”
When Moses was on the mountain for 40 days receiving the Ten Commandments the account says he spoke with God face-to-face. However, centuries later Stephen told the Jews that the Law had been transmitted by angels. So, again, God delegates to his spirit sons the privilege of speaking in his behalf and representing him before humans. The faithful angels at no time sought to take glory to themselves.
Here is what the Insight on the Scriptures has to say about angels.