In the words of the Prophet (peace and blessings be upon him) in this hadith, “So how can his supplication be answered?” there is an indication that supplication has conditions that must be fulfilled and guidelines that must be observed if it is to be accepted and answered. Whoever fails to observe them can well expect that his supplication will not be answered.
Foremost among the conditions of supplication—indeed, foremost among the conditions of every act of obedience through which a servant draws near to Allah—is sincerity to Allah, Exalted be He. It is an essential condition and an indispensable requirement: neither supplication nor any other act of worship will be accepted unless it is performed with sincerity. Allah Most High says: “Indeed, sincere devotion belongs to Allah alone.” 1 He also says: “They were commanded only to worship Allah, devoting their religion sincerely to Him and inclining to the truth.” 2 He also says: “So call upon Allah, devoting your religion sincerely to Him, even though the disbelievers may detest it.” 3 And He says: “Say, ‘My Lord has commanded justice. Direct yourselves toward Him at every place of worship, and call upon Him, devoting your religion sincerely to Him. Just as He brought you into being, so shall you return.’” 4
It is also authentically reported that the Prophet (peace and blessings be upon him) said to Ibn ʿAbbās (may Allah be pleased with him and his father): “When you ask, ask Allah; and when you seek help, seek Allah’s help. Know that if all people were to unite to benefit you in some way, they could benefit you only with something Allah had already decreed for you. And if they were to unite to harm you in some way, they could harm you only with something Allah had already decreed against you. The pens have been lifted and the pages have dried.” 5