He said to the Messenger of Allah ﷺ, "Teach me a supplication to recite in my prayer."He replied, "Say, 'O Allah, I have wronged myself greatly, and none forgives sins but You. So grant me forgiveness from Yourself and have mercy on me. Indeed, You are the Forgiving, the Merciful.'"
أنه قال الرسول الله ﷺ: علمني دعاء أدعو به في صلاتي، قال: قل: اللهم إني ظلمت نفسي ظلما كثيرا، ولا يغفر الذنوب إلا أنت، فاغفر لي مغفرة من عندك، وارحمني إنك أنت الغفور الرحيم.
Bukhari narrated it in the Book of Adhan (834), and Muslim in the Book of Remembrance and Supplication (2705), both from Qutayba bin Saeed, who said, Layth narrated to us, from Yazid bin Abu Habib, from Abu Khayr, from Abdullah bin Amr bin As, from Abu Bakr Siddiq, and he mentioned something similar.Both of them also narrated it, Bukhari in the Book of Tawheed (7388), and Muslim in the Book of Remembrance, through the route of Abdullah bin Wahb, who said, Amr informed me, and Muslim added along with Amr bin Harith an unnamed man, both of them from Yazid bin Abu Habib with the same wording.This unnamed man is Ibn Lahia, as Ibn Khuzayma clarified in his narration. Hafiz mentioned this in Fath al-Bari (2/320).