Ilham (divine inspiration) that occurs to the Awliya is not a proof. Therefore, Ilham should not be used as evidence to establish a religious ruling or to claim that a specific deed has a particular reward. This is the viewpoint of Ahlus Sunnah. One may act upon it only if it does not contradict the Shari'ah (Islamic law).
Imam Ibn Hajar al-Asqalani (﵀), quoting Imam Abu'l Muzaffar Ibn Sam'ani, says:
"Ilham is knowledge received from Allah that inspires the human heart towards good deeds, without it being derived from established textual proofs. One may act according to it only if it does not contradict other established proofs. A group among the innovators (Mubtadi'un) claims it is a proof. However, the proof of Ahlus Sunnah is that in the Holy Quran, Allah commands us to accept what is based on established proofs and to reflect upon evidence to understand matters, while in numerous places, He criticizes following mere conjecture and inner feelings. Moreover, a feeling or thought in the mind can sometimes be from Allah, sometimes from Shaytan (Satan), or sometimes from one's own self (nafs). Something that has the possibility of not being true cannot be definitively asserted as absolutely correct."
قَالَ أَبُو الْمُظَفَّرِ بْنُ السَّمْعَانِيِّ فِي الْقَوَاطِع بَعْدَ أَنْ حَكَى عَنْ أَبِي زَيْدٍ الدَّبُوسِيِّ مِنْ أَئِمَّةِ الْحَنَفِيَّةِ أَنَّ الْإِلْهَامَ مَا حَرَّكَ الْقَلْبَ لِعِلْمٍ يَدْعُو إِلَى الْعَمَلِ بِهِ مِنْ غَيْرِ اسْتِدْلَالٍ وَالَّذِي عَلَيْهِ الْجُمْهُورُ أَنَّهُ لَا يَجُوزُ الْعَمَلُ بِهِ إِلَّا عِنْدَ فَقْدِ الْحُجَجِ كُلِّهَا فِي بَابِ الْمُبَاحِ وَعَنْ بَعْضِ الْمُبْتَدِعَةِ أَنَّهُ حُجَّةٌ وَاحْتَجَّ بِقَوْلِهِ تَعَالَى فَأَلْهَمَهَا فجورها وتقواها .... قَالَ وَحُجَّةُ أَهْلِ السُّنَّةِ الْآيَاتُ الدَّالَّةُ عَلَى اعْتِبَارِ الْحُجَّةِ وَالْحَثِّ عَلَى التَّفَكُّرِ فِي الْآيَاتِ وَالِاعْتِبَارِ وَالنَّظَرِ فِي الْأَدِلَّةِ وَذَمِّ الْأَمَانِيِّ وَالْهَوَاجِسِ وَالظُّنُونِ وَهِيَ كَثِيرَةٌ مَشْهُورَةٌ وَبِأَنَّ الْخَاطِرُ قَدْ يَكُونُ مِنَ اللَّهِ وَقَدْ يَكُونُ مِنَ الشَّيْطَانِ وَقَدْ يَكُونُ مِنَ النَّفْسِ وَكُلُّ شَيْءٍ احْتَمَلَ أَنْ لَا يَكُونَ حَقًّا لَمْ يُوصَفْ بِأَنَّهُ حَقٌّ. فتح الباري ١٢/٣٨٨