Delete project with lots of deployments

Hi, I need to delete a Cloudflare page project with 200+ deployments and I get an error saying it's not possible. I found this guide: https://developers.cloudflare.com/pages/platform/known-issues/#delete-a-project-with-a-high-amount-of-deployments

But when I run the code I get this error:

throw new Error(body.errors[0].message)
          ^

Error: Unable to authenticate request
    at getProductionDeploymentId (/Users/jeannen/Downloads/delete-all-deployments/index.js:31:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async main (/Users/jeannen/Downloads/delete-all-deployments/index.js:126:34)

Node.js v23.7.0


The CF_ACCOUNT_ID and CF_API_TOKEN and CF_PAGES_PROJECT_NAME are all correct and properly passed
Cloudflare Docs
Here are some known bugs and issues with Cloudflare Pages:
Was this page helpful?