Code Monkey home page Code Monkey logo

Comments (4)

jakejarvis avatar jakejarvis commented on May 27, 2024 1

Gotcha, sorry about that! I'll reopen this until I push an update πŸ‘

from cloudflare-purge-action.

RobertClarke avatar RobertClarke commented on May 27, 2024 1

+1 on switching from a global API key to a permission-specific API token. Here's an example purge code using a token:

curl -X POST "https://api.cloudflare.com/client/v4/zones/********/purge_cache"
-H "Content-Type:application/json"
-H "Authorization: Bearer ********"
--data '{"purge_everything":true}'

It should be a simple change to make and removes the need to have the CLOUDFLARE_EMAIL secret. Hope this helps. :)

from cloudflare-purge-action.

jakejarvis avatar jakejarvis commented on May 27, 2024

Hmm, after searching around for that error code it seems like most people with this problem had a copy/paste typo with their API key β€”Β either only getting part of it or an extra space either before/after it, etc... I'd first try just deleting that secret and pasting it in again and let me know if that works.

The dashboard is not the most intuitive so make sure you're under My Profile (in the top right), then the API Tokens tab, and then press View for the Global API Key.

Screen Shot 2019-09-27 at 8 44 01 PM

I haven't looked into supporting API Tokens yet if that's what you're using β€”Β I assume they work the same but I've been meaning to try them myself since they announced them a few weeks ago.

Let me know if that doesn't help, sorry I don't have a more specific answer!

from cloudflare-purge-action.

chabad360 avatar chabad360 commented on May 27, 2024

Ah, thats it, I cant use API Tokens.

Would be nice if that could be added...

from cloudflare-purge-action.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.