Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:152

So remember Me; I will remember you. And be grateful to Me and do not deny Me.  

So remember Me, through prayer, glorification and the like, I will remember you: this is said to mean, ‘I will reward you’; in a hadīth about God ˹that He says˺: ‘whoever remembers Me in himself, I will remember him in Myself, and whoever remembers Me in an assembly, I will remember him in an Assembly more excellent than his’; and be thankful to Me, for My grace, by being obedient, and be not ungrateful towards Me, through disobedience.
القرآن:٢:١٥٢

فَاذْكُرُونِي أَذْكُرْكُمْ وَاشْكُرُوا لِي وَلَا تَكْفُرُونِ  

{فاذكروني} بالصلاة والتسبيح ونحوه {أذكركم} قيل معناه أجازيكم وفي الحديث عن الله (من ذكرني في نفسه ذكرته في نفسي ومن ذكرني في ملأ ذكرته في ملأ خير من ملئه) {واشكروا لي} نعمتي بالطاعة {ولا تكفرون} بالمعصية.