Programmatically generate access tokens for users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am developing a single page app which will display the calendar information of each student.
I prefer that the student does not need to login to Canvas first (go through the OAuth2 flow).
I am able to proxy the Canvas API request through a secure server which contains the developer key client id and secret.
Due to API Rate Limiting, I would like to generate an access token for the specific user the request is for.
In the following document, it mentions something about programmatically generating the token
https://community.canvaslms.com/docs/DOC-8381-api-rate-limiting
However I could not find how to do it in the OAuth2 API documentation
OAuth2 Endpoints - Canvas LMS REST API Documentation
I understand the client_credentials flow is usually for machine to machine. Is there a way to use this for API (non LTI) requests and be limited to a specific user?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You cannot generate tokens for users. Your application needs to use OAuth2.
From the docs, OAuth2 - Canvas LMS REST API Documentation
Note that asking any other user to manually generate a token and enter it into your application is a violation of Canvas' terms of service. Applications in use by multiple users MUST use OAuth to obtain tokens.