Hadithcore
Mishkat al-Masabih, 4040

‘Uqba b. 'Amir told that he said, “Messenger of God, we come to people who do not give us hospitality, or pay what is due to us from them, and we take nothing from them.’’ He replied, “If they make it necessary for you to take it by force, do so.” Tirmidhi transmitted it.

وَعَنْ عُقْبَةَ بْنِ عَامِرٍ قَالَ: قُلْتُ: يَا رَسُولَ اللَّهِ إِنَّا نَمَرُّ بِقَوْمٍ فَلَا هُمْ يُضَيِّفُونَا وَلَا هُمْ يُؤَدُّونَ مَا لنا عَلَيْهِم منَ الحقِّ وَلَا نَحْنُ نَأْخُذُ مِنْهُمْ. فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِنْ أَبَوْا إِلَّا أنْ تأخُذوا كُرهاً فَخُذُوا» . رَوَاهُ التِّرْمِذِيّ

References1 variant
In-Book Reference
Book 19, Hadith 250