This simple Node.js script is designed to delete all the videos from a Cloudflare video stream. It removes videos associated with the specified Cloudflare account using the Cloudflare API.
- Retrieves the list of videos from the Cloudflare video stream associated with the account.
- Deletes each individual video from the Cloudflare platform.
-
Ensure you have Node.js installed on your system. You can download it from here.
-
Download or clone the repository containing the script.
-
Navigate to the project directory through the terminal.
-
Run the command
npm install
to install the necessary dependencies. -
Configure environment variables:
CF_STREAM_ACCOUNTID
: The Cloudflare account ID.CF_STREAM_TOKEN
: The authorization token for Cloudflare API access.
Set these environment variables in your system or use a tool like
dotenv
to manage them within a.env
file. -
Run the script with the command
node filename.js
to initiate the video deletion process.
Disclaimer: By using this script, you agree that I bear no responsibility for any consequences arising from its use. Please ensure that you use it responsibly and in accordance with Cloudflare's terms of service.