Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
I'd like to upload a media file from a URL to a Canvas Studio user's "My Uploads". I see that there is a Canvas Studio Public API that might do what I want. From looking at the public API, questions I have are:
1) Is there more documentation for the API that I just haven't found yet?
2) How do I get an authorization token for the API? I tried my Canvas authorization token, but it doesn't seem to work.
3) Whose user account does the media get uploaded to? API does not seem to specify a target user for the upload.
Thanks for any pointers!
-t
Hi Terence,
I just noticed this post by eallen that might help you out. She shows how to use the OAuth workflow to authenticate.
https://community.canvaslms.com/docs/DOC-17723
It looks like those docs could do with some examples.
Myles
Hello Myles,
Thanks for taking the time to respond to my posting. It turns out that what we need is a server-to-server API call that is not happening in the context of a specific user, so it's not an oAuth type scenario. We want something like Canvas's file upload API. As far as we can tell, Studio currently does not support this, unfortunately. But many thanks for responding!
-terence
hi Terence, have you find the solution for uploading the media to canvas studio using the API
Even, I have the same issue someone can help with that.
For anyone that stumbles on this page more recently, check out canvas-studio-api-examples/examples/upload-media-from-local at main · instructure/canvas-studio-api-... for an example of uploading. You'd need to do the full OAuth steps first, and there are ways in Python or other languages to use libraries or sample code to do server-to-server OAuth.
You could also look at Low Code or iPaaS solutions that can do server file/local file actions and custom OAuth-protected APIs. Like PowerAutomate or Informatica.
Just a couple of lessons learned about the Studio API.
1. Your live API is at yourinstance.instructuremedia.com/api/public/docs/#/ - at least in our case, it's unique to us.
2. The value for the Authorize button on that page can be found by logging in to Studio, then grabbing the Authorization header in your browser - see screenshot.
3. The programmatic way to get authorized is via standard OAuth -- key and secret are set up under your Studio settings. For whatever reason, localhost doesn't work for the redirect under Settings. You'll have to redirect to some other site you own that will allow you to grab the code.
To participate in the Instructure Community, you need to sign up or log in:
Sign In