Stream upload with API token

Hello, I have an application uploading videos to Cloudflare Stream.

Everything works great, but I’m using a Global API Key in the application to authenticate to Stream for uploading content.

I’ve seen that recently API Tokens reached GA, so I was hoping to use those to replace the API Key in my application.

I created an API Token with Stream:Edit capabilities, I updated my code to send the Authorization: Bearer ... header to the upload endpoint but I get a 400 error.

Is it possible that the Stream upload endpoint has no support for API Tokes yet?

Thank you!

1 Like

That is a possibility. There has been recently a similar issue in a related area.

The best might be to simply drop support a message.

1 Like

Hi there!

We’re aware of this error when using the TUS resumable upload method documented here:

The workaround right now is to continue using the Global API key.

Please submit a Support Ticket so we can notify you when a fix is available! If you provide the ticket number here, I’ll go find it and link it up with our internal tracker.

1 Like

I tried again this in the last month and thanks to help from support I was able to make it work.

Make sure to update the way you perform authentication from X-Auth-Key, X-Auth-Email to Authorization header with Bearer token.

Check out the Developer documentation for more details: