Delete a project with high number of deployments workaround is failing

I'm trying to delete a project by following this guide https://developers.cloudflare.com/pages/platform/known-issues/#delete-a-project-with-a-high-number-of-deployments

But I'm getting authentication errors when running the script.

I'm pretty sure I've got the env vars correct. I should use the Global API key from https://dash.cloudflare.com/profile/api-tokens ?
Cloudflare Docs
Here are some known bugs and issues with Cloudflare Pages:
Was this page helpful?