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!
Have the ability to get conversations from students by API if I am administrator?
I read documentation https://canvas.instructure.com/doc/api/conversations.html and have not found how I can do that. I thought that there could be a parameter user_id but there is not.
We need to show warning to students if they receive a new message in conversation in the app.
Thanks for help.
Solved! Go to Solution.
As an admin there isn't a api to get user's conversations. The API to get conversations can only be requested by the user and it will return their conversations. As an admin I have to masquerade as users to view conversations, there are many instances of bullying and inappropriate use of the inbox where I need to do this. Regarding your question about showing a warning to student about new messages, Canvas already has several features to alert users of new messages. It shows a blue alert (count) in the UI on the the Inbox icon that shows there are new/unread messages. Users can also configure their Canvas notifications to send new Inbox messages to their email (I'm pretty sure that setting is defaulted on to the "right away" frequency).
Hope I understand your question clearly. If you are curious about how the canvas knows your identity(then can retrieve the conversations), please read the following instructions:
https://canvas.instructure.com/doc/api/file.oauth.html
The canvas use OAuth2.0 and access token to do the authentication.
As an admin there isn't a api to get user's conversations. The API to get conversations can only be requested by the user and it will return their conversations. As an admin I have to masquerade as users to view conversations, there are many instances of bullying and inappropriate use of the inbox where I need to do this. Regarding your question about showing a warning to student about new messages, Canvas already has several features to alert users of new messages. It shows a blue alert (count) in the UI on the the Inbox icon that shows there are new/unread messages. Users can also configure their Canvas notifications to send new Inbox messages to their email (I'm pretty sure that setting is defaulted on to the "right away" frequency).
It is possible to use the Canvas API to get the Conversations of another user, but it will require that your admin account has permission to act as the user you want to get the conversations from. When performing the API call, you will need to use the query parameter to act as a particular user and provide that user's ID. Masquerading
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