The Instructure Community will enter a read-only state on November 22, 2025 as we prepare to migrate to our new Community platform in early December.
Read our blog post for more info about this change.
Found this content helpful? Log in or sign up to leave a like!
Hello,
I am a student working on a small application using the Canvas API for me and my classmates. I'd like to create a Next.js app that allows users of the site to sign in using their Google account, and then displays a list of their unsubmitted assignments, organized by due date (almost like a to-do list). Is this possible to do using the Canvas LMS api? How should I make sure that authentication is handled safely?
Thank you in advance for your help!
Solved! Go to Solution.
Hello @CuriousDroid,
I think it is great that you are trying to make a useful tool for yourself and your classmates. However, if you are doing this to learn Next.js and web development, you may be better served by trying to use an API that is easier to access (either freely or easier to obtain an API key). The reason I mention this is that your app will need to provide an access token to access data via the Canvas API on behalf of a user, and to get an Access Token, your app must go through the OAuth2 authentication flow, which requires that an API Key was already set up by a Canvas administrator in the Canvas instance available on the domain that your user would like to connect to your app (more details below). If you are not a Canvas administrator in the Canvas instance that you are making this Next.js app for, it will not be possible to get an API Key set up for your app to work. I have provided more specific details below explaining this.
Based on the information you provided, here are the steps your app would have to complete:
Here is where you may hit some roadblocks:
I hope this helped. Canvas has a lot of security built in (and for good reason), so directly accessing the API requires several steps and permissions to be granted. If you wanted to explore making a Chrome Extension, that could be a viable way to accomplish your "Assignment To-Do" app via content script injection, but then you are just running some extra JavaScript on a Canvas page instead of setting up an entire web app with Next.js.
Hello @CuriousDroid,
I think it is great that you are trying to make a useful tool for yourself and your classmates. However, if you are doing this to learn Next.js and web development, you may be better served by trying to use an API that is easier to access (either freely or easier to obtain an API key). The reason I mention this is that your app will need to provide an access token to access data via the Canvas API on behalf of a user, and to get an Access Token, your app must go through the OAuth2 authentication flow, which requires that an API Key was already set up by a Canvas administrator in the Canvas instance available on the domain that your user would like to connect to your app (more details below). If you are not a Canvas administrator in the Canvas instance that you are making this Next.js app for, it will not be possible to get an API Key set up for your app to work. I have provided more specific details below explaining this.
Based on the information you provided, here are the steps your app would have to complete:
Here is where you may hit some roadblocks:
I hope this helped. Canvas has a lot of security built in (and for good reason), so directly accessing the API requires several steps and permissions to be granted. If you wanted to explore making a Chrome Extension, that could be a viable way to accomplish your "Assignment To-Do" app via content script injection, but then you are just running some extra JavaScript on a Canvas page instead of setting up an entire web app with Next.js.
Community helpTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign inTo interact with Panda Bot, our automated chatbot, you need to sign up or log in:
Sign in