Sunan an-Nasa'i 1167
It was narrated from 'Alqamah bin Qais that 'Abdullah said:
"We used not to know what to say when we prayed, then the Messenger of Allah (ﷺ) taught us some eloquent and concise words. He said to us: 'Say: "At-tahiyyatu lillahi was-salawatu wat-tayyibat, as-salamu 'alaika ayyuhan-Nabiyyu wa rahmatAllahi wa baraktuhu. As-salamu 'alaina wa 'ala 'ibad illahis-salihin, ashahdu an la illaha ill-Allah wa ashhadu anna Muhammadan 'abduhu wa rasuluhu (Allah compliments, prayers and pure words are due to Allah. Peace be upon you, O Prophet, and the mercy of Allah (SWT) and his blessings. Peace be upon us and upon the righteous slaves of Allah (SWT). I bear witness that none has the right to be worshipped except Allah and I bear witness that Muhammad is His slave and Messenger)." (One of the narrators) 'Ubaidullah said: "Zaid bin Hammad said, narrating from Ibrahim, that 'Alqamah said: 'I saw Ibn Mas'ud teaching us these words just as he taught us the Quran."
أَخْبَرَنِي مُحَمَّدُ بْنُ جَبَلَةَ الرَّافِقِيُّ، قَالَ حَدَّثَنَا الْعَلاَءُ بْنُ هِلاَلٍ، قَالَ حَدَّثَنَا عُبَيْدُ اللَّهِ، - وَهُوَ ابْنُ عَمْرٍو - عَنْ زَيْدِ بْنِ أَبِي أُنَيْسَةَ، عَنْ حَمَّادٍ، عَنْ إِبْرَاهِيمَ، عَنْ عَلْقَمَةَ بْنِ قَيْسٍ، عَنْ عَبْدِ اللَّهِ، قَالَ كُنَّا لاَ نَدْرِي مَا نَقُولُ إِذَا صَلَّيْنَا فَعَلَّمَنَا نَبِيُّ اللَّهِ صلى الله عليه وسلم جَوَامِعَ الْكَلِمِ فَقَالَ لَنَا ‏
"‏ قُولُوا التَّحِيَّاتُ لِلَّهِ وَالصَّلَوَاتُ وَالطَّيِّبَاتُ السَّلاَمُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ السَّلاَمُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ ‏"‏ ‏.‏ قَالَ عُبَيْدُ اللَّهِ قَالَ زَيْدٌ عَنْ حَمَّادٍ عَنْ إِبْرَاهِيمَ عَنْ عَلْقَمَةَ قَالَ لَقَدْ رَأَيْتُ ابْنَ مَسْعُودٍ يُعَلِّمُنَا هَؤُلاَءِ الْكَلِمَاتِ كَمَا يُعَلِّمُنَا الْقُرْآنَ ‏.‏