The Prophet ﷺ said: Acts of begging are lacerations with which a man disfigures his face, so he who wishes may preserve his self-respect, and he who wishes may abandon it; but this does not apply to one who begs from a ruler, or in a situation which makes it necessary. (Using translation from Abū Dāʾūd 1639)
أَنَّ النَّبِيَّ ﷺ قَالَ الْمَسَائِلُ كُدُوحٌ يَكْدَحُ بِهَا الرَّجُلُ وَجْهَهُ فَمَنْ شَاءَ أَبْقَى عَلَى وَجْهِهِ وَمَنْ شَاءَ تَرَكَ إِلَّا أَنْ يَسْأَلَ الرَّجُلُ ذَا سُلْطَانٍ أَوْ يَسْأَلَ فِي الْأَمْرِ لَا يَجِدُ مِنْهُ بُدًّا قَالَ فَحَدَّثْتُ بِهِ الْحَجَّاجَ فَقَالَ سَلْنِي فَإِنِّي ذُو سُلْطَانٍ