
Permission Denied when using Upload API
Hello,
I'm trying out video uploading using the Platform API, and am getting a 403 error code and this response:
{
code: "PermissionDenied"
message: "Not authorized to make this call"
status: "error"
title: "Permission Denied"
}
I followed some of the logic in the Python Kit, and am trying to upload this file via an HTML form and Javascript. I am able to call the video/create API and receive an 'OK' response, including an upload URL, key, and token. This call is being done on the server, in Python.
When I try to POST the file to this URL from the browser, using the received key and token, I get the permission denied error. I am using an HTML form, and constructing the upload URL with parameters before submitting it via Javascript.
My upload request looks like this:
http://upload.jwplatform.com/v1/videos/upload?api_format=json&key=<RECEIVED_KEY>&token=<RECEIVED_TOKEN>&file_size=196147338
Are any specific HTTP headers required? Am I missing a parameter, or a setting in my account? I have looked at the Python kit upload example and the request that gets generated, and I can't see anything obvious. I'm not sure what I'm doing wrong with the request, as the API docs are quite sparse on detail.
Thanks