Signed Urls, Keys, Tokens....... HELP!

Im pretty new to this and although I know that I need to create a signing key etc, I am completely bamboozled as to how to go about it. https://developers.cloudflare.com/stream/security/signed-urls/ does explain what is needed and does provide some code but I just dont know where to start. Can anyone help a damsel in distress lol?!

Rachel

You need API Keys and curl installed on your box.

Well Xaq, it’s not so easy. I am in the same situation of rachel3. I know a bit of bash and I substituted my email, account auth code and api key in the following script:
curl -X POST -H “X-Auth-Email: {EMAIL}" -H "X-Auth-Key: {API-KEY}” “https://api.cloudflare.com/client/v4/accounts/{account_id}/media/keys

but when I curl the first passage to create a signing Key

I got the attached as result…
https://ibb.co/7rcRY76

Attached screenshot is the result of a GET request.

well, I feel like a dumbass now Xaq… thanks for the heads up. It’s indeed working correctly.
Things don’t change much as Rachel is correct… there is not much explanation on the rachel’s link about how to really make signed urls working (e.g. if you have wordpress).

I will make myself clear: generating signed URLs seems pretty ok and explained (tokens system) ad it seems easy to do.

The real question is HOW TO MODIFY all links in all posts or CF players to use new URLs (token ones) and modify them on each page load.

If someone wants to really have an URL that expires after the view of that very video, how can he really make it working using the CF player in WP and without coding expirience? Is the CF player doing that automatically?

I am even willing and able to pay to have a hand on that… as is driving me crazy to have such a brilliant, affordable and reliable system such as CF stream but not understanding the above :)))

Signed URLs is a method of protection for your assets. You need to implement your own side of providing new links to authorized users.

I doubt it is not possible. @sdayman may know some workarounds.

Sorry, I’ve never tried this. I really like the idea, though.

I see, thanks for your answer Xaq. Finding your “own side of providing links” is clearly something CF should work in the next months if they want to have success with this brilliant service (e.g. a javascript integrated in their player that do the job, wordpress plugin or a php code to embed into WP, etc…).

It basically means translating this script:


into something digestible by, at least, WP which is powering 60% of worldwide CMS. And then make in sort the player to change the token at each page load… I bet there are thousands or dozen of thousands people in my very situation that would love to have a script provided by CF that do this very job!!!

From CF it’s a bit like saying
“ehi guys, we have a nice cake here for you, affordable, delicious and healthy, but you need to figure out a way how to cut it, put it on your plate and eat it” :slight_smile:

Majority of users (incl. myself) that search for an easy all-in-one solution for protecting their videos (storage, encoding, distri and player) have their hands bound behind their backs and sit on a chair… it’s very difficult to eat that cake!

If you would know how to code something like that or knows someone that could do that for an affordable price, pls give me a head up :)) Thanks a lot for your time for now

What you need is a WordPress plugin covering general use-cases but still such plugin cannot cover specific scenarios and server side coding will be required.