Stream API "Unable to authenticate" / "Decoding Error A portion of the request could be not decoded"
Hi,
I have just started with the Stream API and I wish to upload files from my NodeJS server to Stream using fetch. Running into problems there, I figured i'd start with a simple Postman configuration.
Following the Cloudflare documentation, I try to upload a file using POST "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/stream" with multipart/form-data and the API key in the header. Attaching an MP4 file of 4MB this gives the following error: "Decoding Error: A portion of the request could be not decoded. Refer to the messages field for more information and try again". The messages field is empty.
Okay, trying the other documented way, by changing the type to JSON with an empty body, "{}". This gives the error: "Unable to authenticate request".
Even though X-Auth-Key and X-Auth-Email headers are set.
The api key has the proper Stream permissions form the template (edit & read). It was freshly created.
Uploading the file manually through the Cloudflare web portal works fine, so there is nothing wrong with the file.
Is there anything I am doing wrong?
0 Replies