Using API to get which courses is the student enrolled in

Ka.M.925 Posts: 5 🔍
I have a small webapp that I want students from Brightspace LMS to use for their courses. The app is supposed to display different data based on each course the student is enrolled in. My idea of implementing that was to include the URL for the app in the course page, then when a student clicks it, it redirects them to the app and the app checks using D2L API which course the student is from and acts accordingly. I'm not sure if this is possible as I wasn't able to find related posts about it.
Thanks in advance.