Jami` at-Tirmidhi, Volume 4, Book 35, Hadith 2516 (DarusSalam) ⓘ
Ibn 'Abbas narrated: "I was behind the Prophet(s.a.w) one day when he said: 'O boy! I will teach you a statement: Be mindful of Allah and He will protect you. Be mindful of Allah and you will find Him before you. When you ask, ask Allah, and when you seek aid, seek Allah's aid. Know that if the entire creation were to gather together to do something to benefit you- you would never get any benefit except that Allah had written for you. And if they were to gather to do something to harm you- you would never be harmed except that Allah had written for you. The pens are lifted and the pages are dried.'"
حَدَّثَنَا أَحْمَدُ بْنُ مُحَمَّدِ بْنِ مُوسَى، أَخْبَرَنَا عَبْدُ اللَّهِ بْنُ الْمُبَارَكِ، أَخْبَرَنَا لَيْثُ بْنُ سَعْدٍ، وَابْنُ، لَهِيعَةَ عَنْ قَيْسِ بْنِ الْحَجَّاجِ، قَالَ وَحَدَّثَنَا عَبْدُ اللَّهِ بْنُ عَبْدِ الرَّحْمَنِ، أَخْبَرَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا لَيْثُ بْنُ سَعْدٍ، حَدَّثَنِي قَيْسُ بْنُ الْحَجَّاجِ الْمَعْنَى، وَاحِدٌ، عَنْ حَنَشٍ الصَّنْعَانِيِّ، عَنِ ابْنِ عَبَّاسٍ، قَالَ كُنْتُ خَلْفَ رَسُولِ اللَّهِ صلى الله عليه وسلم يَوْمًا فَقَالَ " يَا غُلاَمُ إِنِّي أُعَلِّمُكَ كَلِمَاتٍ احْفَظِ اللَّهَ يَحْفَظْكَ احْفَظِ اللَّهَ تَجِدْهُ تُجَاهَكَ إِذَا سَأَلْتَ فَاسْأَلِ اللَّهَ وَإِذَا اسْتَعَنْتَ فَاسْتَعِنْ بِاللَّهِ وَاعْلَمْ أَنَّ الأُمَّةَ لَوِ اجْتَمَعَتْ عَلَى أَنْ يَنْفَعُوكَ بِشَيْءٍ لَمْ يَنْفَعُوكَ إِلاَّ بِشَيْءٍ قَدْ كَتَبَهُ اللَّهُ لَكَ وَلَوِ اجْتَمَعُوا عَلَى أَنْ يَضُرُّوكَ بِشَيْءٍ لَمْ يَضُرُّوكَ إِلاَّ بِشَيْءٍ قَدْ كَتَبَهُ اللَّهُ عَلَيْكَ رُفِعَتِ الأَقْلاَمُ وَجَفَّتِ الصُّحُفُ " . قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ .
also referenced under: Hadith 2516 (Reference) & Book 37, Hadith 2706 (In-Book)