curl -X POST “https://api.cloudflare.com/client/v4/accounts/***/stream/direct_upload” -H “X-Auth-Email: *****@gmail.com” -H “X-Auth-Key: *****” -H “Content-Type: application/json” --data ‘{“maxDurationSeconds”:300,“expiry”:“2021-01-02T02:20:00Z”,“thumbnailTimestampPct”:0.529241,“allowedOrigins”:[“example.com”],“requireSignedURLs”:true,“watermark”:{“uid”:“first video”}}’
Response -
{
“result”: null,
“success”: false,
“errors”: [
{
“code”: 10005,
“message”: “Bad Request”
}
],
“messages”: null
}
Can you pls guide me the issue ? I am using global API key and my account email.
Regards,
Deepak
renan
#2
I just ran a request like this and it worked:
curl -X POST https://api.cloudflare.com/client/v4/accounts/8846293bd06d1af8c106d89ec1454fe6/media/direct_upload --data '{"maxDurationSeconds": 3600,"expiry": "2021-01-14T23:20:00Z","requireSignedURLs": true}' -H "X-Auth-Key: xxx" -H "X-Auth-Email: [email protected]"
{
"result": {
"uploadURL": "https://upload.videodelivery.net/9deb94ef868a4f088116e43309507ac6",
"uid": "9deb94ef868a4f088116e43309507ac6",
"watermark": null
},
"success": true,
"errors": [],
"messages": []
}
renan
#3
Could it be because you are trying to use a watermark with UID “first video”, which is not a valid UID for a watermark?