American Opportunity Tax Credit for International Students?

Hello everyone, 

I am an international student in the US since 2017. But I got some on-campus jobs in 2018 and 2019. I used TurboTax to file my taxes. Everything went perfectly fine and there was no error appeared. However, I recently found out that I accidentally received American Opportunity Tax Credits for these two years. I didn't notice that AOPC is only for U.S citizens and permanent residents. TurboTax did not warn me anything so I didn't know that issue. So, what should I do now? Should I use a different platform like Sprintax to file the tax if I work in 2021? Also, do I need to return the AOTC, and how? Will this issue affect me in the future if I begin my H1B/green card sponsorship? Please help. Thank you so much!