I'm trying to upload a file to canvas via a POST request as described in the Canvas Api Documentation.
The first Post request is successful, returning a JSON response. However, the second Post request, in which I use the JSON parameters from the first request, returns a 403 Forbidden error with the following message: "Query-string authentication requires the Signature, Expires and AWSAccessKeyId parameters."
I'm not sure how to fix this error, as "Expires" does not appear as a parameter in the JSON response, nor does it appear in the Canvas API Documentation. My Post request does include the Signature and AWSAccessKeyId parameters that I get from the JSON response to the first Post request.
Any ideas on how to fix this?
Also, I am using Google's Advanced Rest Client, and have successfully used the API to upload a file to Canvas using a URL.
Thanks for your help!
Hello @mlampert ...
I am sorry to see that you question has been sitting here unanswered in the Canvas Community since March 16th. #sadpanda While I do not have an answer for you myself, I wanted to check in with you to see if you've come up with any solutions on your end since you first posted this question. If so, would you mind sharing what you've come up with? Or, if you are still looking for some help with this question, please let us know that, too. In order to help get your question some additional exposure, I am going to share your question with the https://community.canvaslms.com/groups/canvas-developers?sr=search&searchId=a289e086-c15a-4e38-aedc-... group here in the Canvas Community. If you aren't following this group, use the link I've provided, and then click on the "Follow" button at the top right corner of the page.
Looking forward to hearing from you soon, Marcus!
For the second POST request, you need to attach all the parameters returned from the first POST request response.
For instance, here are the responses from my first POST request
For the second POST request, you need a body like this
You may find more information in this course (Canvas Dev and Friends ).