Ali reported that the Messenger of Allah ﷺ said, "Shall I teach you words which, if you say them, you will be forgiven, even though you are already forgiven? There is no god but Allah, the Most High, the Magnificent. There is no god but Allah, the Forbearing, the Generous. Glory be to Allah, Lord of the Mighty Throne. All praise belongs to Allah, Lord of the worlds."
قال رسول الله ﷺ: ألا أعلمك كلمات إذا قلتهن غفر لك، على أنه مغفور لك: لا إله إلا الله العلي العظيم، لا إله إلا الله الحليم الكريم، سبحان الله رب العرش العظيم، الحمد لله رب العالمين.
Ahmad (1363) and Nasai in Amal al-Yawm wal-Layla (637) both narrated it through the route of Israil, from Abu Ishaq, from Abdul-Rahman bin Abu Layla, from Ali, who mentioned it. This is a sahih chain of transmission. There has been extensive disagreement regarding Abu Ishaq's narration, but Israil's narration from his grandfather Abu Ishaq is of the utmost precision, and Thawri corroborated him from Abu Ishaq, as noted in Ilal Daraqutni (7/6, and 9-10).It was also narrated by Ahmad (712), Nasai in Amal al-Yawm wal-Layla (638), and Ibn Hibban (6928), all through the route of Ali bin Salih Hamadani, and Nasai (639) through the route of Yusuf bin Ishaq bin Abu Ishaq, and Ibn Abu Asim in Sunnah (1352) through the route of Nusayr bin Abu Ashath, all three of them from Abu Ishaq, from Amr bin Mura, from Abdullah bin Salama, from Ali, who mentioned it.Daraqutni said in Ilal (9/4), "The closest to being correct is the statement of those who said, from Abu Ishaq, from Amr bin Mura, from Abdullah bin Salama, from Ali. This does not negate the statement of Israil, from Abu Ishaq, from Ibn Abu Layla, from Ali." End of quote.This is as he said, for Abu Ishaq had two teachers, one of them Amr bin Mura and the other Abdul-Rahman bin Abu Layla, and both routes are sahih.The hadith has another route found in Tirmidhi (3504), but it is defective.