I am able to generate a Direct Creator Upload URL for Images but not for Stream. I’m implementing these as Firebase cloud functions. The code for images and stream is almost the same, only the endpoint is different and “maxDurationSeconds”: 3600 needs to be added.
Using the Curl command given here:
ken@ken:~$ curl -X POST \
-H 'Authorization: Bearer <API_TOKEN>' \
https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/stream/direct_upload \
--form 'data={"maxDurationSeconds":"3600"}'
I get:
{"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}
It’s the same API token and Account ID that works for Images… what’s wrong?