I want to allow my clients to download a .zip archive if they provide a correct license key that I check using an API.

Currently, I do that by hosting the .zip on a PHP server, and having a download.php?license=YOUR_KEY that checks the key and returns the file if ok, an error otherwise.

I want to use spaces to DO spaces host the .zip file. How can I allow clients to download the file only if the license is valid?

A solution that I thought of would be to still have the download.php, but if the license is valid I would redirect to a one-time download link to the DO Spaces file.

*Is there any way to create one-time download links for a file in DigitalOcean spaces? *If not, any other solution to allow clients to download a file only if a condition is met?

Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!