Narrated `Abdullah bin Ka`b:

I heard Ka`b bin Malik who was one of the three who were forgiven, saying that he had never remained behind Allah's Messenger (ﷺ) in any Ghazwa which he had fought except two Ghazwat Ghazwat- Al-`Usra (Tabuk) and Ghazwat-Badr. He added. "I decided to tell the truth to Allah's Messenger (ﷺ) in the forenoon, and scarcely did he return from a journey he made, except in the forenoon, he would go first to the mosque and offer a two-rak`at prayer. The Prophet (ﷺ) forbade others to speak to me or to my two companions, but he did not prohibit speaking to any of those who had remained behind excepting us. So the people avoided speaking to us, and I stayed in that state till I could no longer bear it, and the only thing that worried me was that I might die and the Prophet (ﷺ) would not offer the funeral prayer for me, or Allah's Messenger (ﷺ) might die and I would be left in that social status among the people that nobody would speak to me or offer the funeral prayer for me. But Allah revealed His Forgiveness for us to the Prophet (ﷺ) in the last third of the night while Allah's Messenger (ﷺ) was with Um Salama. Um Salama sympathized with me and helped me in my disaster. Allah's Messenger (ﷺ) said, 'O Um Salama! Ka`b has been forgiven!' She said, 'Shall I send someone to him to give him the good tidings?' He said, 'If you did so, the people would not let you sleep the rest of the night.' So when the Prophet (ﷺ) had offered the Fajr prayer, he announced Allah's Forgiveness for us. His face used to look as bright as a piece of the (full) moon whenever he was pleased. When Allah revealed His Forgiveness for us, we were the three whose case had been deferred while the excuse presented by those who had apologized had been accepted. But when there were mentioned those who had told the Prophet (ﷺ) lies and remained behind (the battle of Tabuk) and had given false excuses, they were described with the worse description one may be described with. Allah said: 'They will present their excuses to you (Muslims) when you return to them. Say: Present no excuses; we shall not believe you. Allah has already informed us of the true state of matters concerning you. Allah and His Apostle will observe your actions." (9.94)

حَدَّثَنِي مُحَمَّدٌ، حَدَّثَنَا أَحْمَدُ بْنُ أَبِي شُعَيْبٍ، حَدَّثَنَا مُوسَى بْنُ أَعْيَنَ، حَدَّثَنَا إِسْحَاقُ بْنُ رَاشِدٍ، أَنَّ الزُّهْرِيَّ، حَدَّثَهُ قَالَ أَخْبَرَنِي عَبْدُ الرَّحْمَنِ بْنُ عَبْدِ اللَّهِ بْنِ كَعْبِ بْنِ مَالِكٍ، عَنْ أَبِيهِ، قَالَ سَمِعْتُ أَبِي كَعْبَ بْنَ مَالِكٍ،، وَهْوَ أَحَدُ الثَّلاَثَةِ الَّذِينَ تِيبَ عَلَيْهِمْ أَنَّهُ لَمْ يَتَخَلَّفْ عَنْ رَسُولِ اللَّهِ صلى الله عليه وسلم فِي غَزْوَةٍ غَزَاهَا قَطُّ غَيْرَ غَزْوَتَيْنِ غَزْوَةِ الْعُسْرَةِ وَغَزْوَةِ بَدْرٍ‏.‏ قَالَ فَأَجْمَعْتُ صِدْقَ رَسُولِ اللَّهِ صلى الله عليه وسلم ضُحًى، وَكَانَ قَلَّمَا يَقْدَمُ مِنْ سَفَرٍ سَافَرَهُ إِلاَّ ضُحًى وَكَانَ يَبْدَأُ بِالْمَسْجِدِ، فَيَرْكَعُ رَكْعَتَيْنِ، وَنَهَى النَّبِيُّ صلى الله عليه وسلم عَنْ كَلاَمِي وَكَلاَمِ صَاحِبَىَّ، وَلَمْ يَنْهَ عَنْ كَلاَمِ أَحَدٍ مِنَ الْمُتَخَلِّفِينَ غَيْرِنَا، فَاجْتَنَبَ النَّاسُ كَلاَمَنَا، فَلَبِثْتُ كَذَلِكَ حَتَّى طَالَ عَلَىَّ الأَمْرُ، وَمَا مِنْ شَىْءٍ أَهَمُّ إِلَىَّ مِنْ أَنْ أَمُوتَ فَلاَ يُصَلِّي عَلَىَّ النَّبِيُّ صلى الله عليه وسلم أَوْ يَمُوتَ رَسُولُ اللَّهِ صلى الله عليه وسلم فَأَكُونَ مِنَ النَّاسِ بِتِلْكَ الْمَنْزِلَةِ، فَلاَ يُكَلِّمُنِي أَحَدٌ مِنْهُمْ، وَلاَ يُصَلِّي عَلَىَّ، فَأَنْزَلَ اللَّهُ تَوْبَتَنَا عَلَى نَبِيِّهِ صلى الله عليه وسلم حِينَ بَقِيَ الثُّلُثُ الآخِرُ مِنَ اللَّيْلِ، وَرَسُولُ اللَّهِ صلى الله عليه وسلم عِنْدَ أُمِّ سَلَمَةَ، وَكَانَتْ أُمُّ سَلَمَةَ مُحْسِنَةً فِي شَأْنِي مَعْنِيَّةً فِي أَمْرِي، فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ يَا أُمَّ سَلَمَةَ تِيبَ عَلَى كَعْبٍ ‏"‏‏.‏ قَالَتْ أَفَلاَ أُرْسِلُ إِلَيْهِ فَأُبَشِّرَهُ قَالَ ‏"‏ إِذًا يَحْطِمَكُمُ النَّاسُ فَيَمْنَعُونَكُمُ النَّوْمَ سَائِرَ اللَّيْلَةِ ‏"‏‏.‏ حَتَّى إِذَا صَلَّى رَسُولُ اللَّهِ صلى الله عليه وسلم صَلاَةَ الْفَجْرِ آذَنَ بِتَوْبَةِ اللَّهِ عَلَيْنَا، وَكَانَ إِذَا اسْتَبْشَرَ اسْتَنَارَ وَجْهُهُ حَتَّى كَأَنَّهُ قِطْعَةٌ مِنَ الْقَمَرِ، وَكُنَّا أَيُّهَا الثَّلاَثَةُ الَّذِينَ خُلِّفُوا عَنِ الأَمْرِ الَّذِي قُبِلَ مِنْ هَؤُلاَءِ الَّذِينَ اعْتَذَرُوا حِينَ أَنْزَلَ اللَّهُ لَنَا التَّوْبَةَ، فَلَمَّا ذُكِرَ الَّذِينَ كَذَبُوا رَسُولَ اللَّهِ صلى الله عليه وسلم مِنَ الْمُتَخَلِّفِينَ، وَاعْتَذَرُوا بِالْبَاطِلِ، ذُكِرُوا بِشَرِّ مَا ذُكِرَ بِهِ أَحَدٌ قَالَ اللَّهُ سُبْحَانَهُ ‏{‏يَعْتَذِرُونَ إِلَيْكُمْ إِذَا رَجَعْتُمْ إِلَيْهِمْ قُلْ لاَ تَعْتَذِرُوا لَنْ نُؤْمِنَ لَكُمْ قَدْ نَبَّأَنَا اللَّهُ مِنْ أَخْبَارِكُمْ وَسَيَرَى اللَّهُ عَمَلَكُمْ وَرَسُولُهُ‏}‏ الآيَةَ‏.‏
USC-MSA web (English) reference : Vol. 6, Book 60, Hadith 199
Arabic reference : Book 65, Hadith 4677