How Access tokens can be generated automatically for each user .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I am creating one app where I am using canvas LMS Rest Apis but right now I have created the access token manually which I am using to get the data from APIs .
but if I wanted to get data for specific users then how I can generate the token for users automatically? I don't want to create tokens manually.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can use "Masquerading" to send API requests as another user instead of creating an access token for that user, this is useful when you wanted to perform an action on behalf of a user
https://canvas.instructure.com/doc/api/file.masquerading.html
However, if your account is an Admin, you can get data for any users without their API token.
If you're designing an app for users to utilise API, you will need to implement OAuth2, which requires a user to login to Canvas using their credentials then it will generate the necessary API token for the user to perform API requests.
https://canvas.instructure.com/doc/api/file.oauth.html