Can't delete video using API token: DELETE method not allowed


I tried deleting a video from Stream using the API, both from Node and by using a simple curl request. But it doesn’t let me: it says the DELETE method is not allowed:

curl -X DELETE -H "Authorization: Bearer MY-API-TOKEN" ""

{"success":false,"errors":[{"code":10000,"message":"DELETE method not allowed for the api_token authentication scheme"}]}

I had a look at the API token’s permissions and it does have the Stream “Edit” permission (as shown in the image below). The dropdown gives a choice of “Edit” or “Read”. I would have assumed “Edit” gives full CRUD for Stream. But unless I’m missing something, it seems not. What additional permission do I need to give it to be able to DELETE? I had a scroll through this page API token permissions · Cloudflare Fundamentals docs … however the only Stream-applicable ones seem to be the Edit and Read ones.


Should this not be:


Sigh. Indeed it should. My fault. I wonder where I copied that path from …

I guess if the error message had instead said e.g No route for the URI or something, that would have been immediately obvious. Or I could read the docs (I see they’ve been updated which is neat). One or the other :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.