{"id":3360,"date":"2025-02-24T12:09:40","date_gmt":"2025-02-24T10:09:40","guid":{"rendered":"https:\/\/fastpixel.io\/?post_type=docs&#038;p=3360"},"modified":"2025-02-25T11:46:45","modified_gmt":"2025-02-25T09:46:45","password":"","slug":"using-fastpixel-with-cloudflares-api-token","status":"publish","type":"docs","link":"https:\/\/fastpixel.io\/fr\/docs\/using-fastpixel-with-cloudflares-api-token\/","title":{"rendered":"Using FastPixel with Cloudflare&#8217;s API Token"},"content":{"rendered":"<p class=\"has-palette-color-8-color has-palette-color-2-background-color has-text-color has-background has-link-color wp-elements-1d5b2df7ca98bc3a67fc19e37d78dd6e\">To follow the instructions below, you must have access to your Cloudflare control panel. If Cloudflare was set up through your hosting provider (e.g., SiteGround, WP Engine, Kinsta, etc.), you will not be able to proceed unless they grant you access to your Cloudflare control panel. Alternatively, you can disable the Cloudflare integration with your hosting provider and set it up yourself using a free Cloudflare account.<\/p>\n\n\n\n<p>FastPixel allows you to use a secure Cloudflare API Token in its settings instead of the Global API Key and Cloudflare account email. This integration enables our plugin to update your cache on Cloudflare as soon as the pages are optimized, ensuring that Cloudflare never serves unoptimized pages.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"559\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-1024x559.png\" alt=\"\" class=\"wp-image-3380\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-1024x559.png 1024w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-300x164.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-768x420.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-1536x839.png 1536w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-2048x1119.png 2048w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/fastpixel-cloudflare-360x197.png 360w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To create a token suitable for this purpose, you need to grant it the &#8220;<strong>Cache Purge<\/strong>&#8221; permission. Follow the instructions below to create it:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to your Cloudflare account, click the Profile icon in the top right section of the screen, and then click Profile.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img decoding=\"async\" width=\"300\" height=\"275\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step1-1-300x275.png\" alt=\"\" class=\"wp-image-3382\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step1-1-300x275.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step1-1-360x330.png 360w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step1-1.png 728w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>2. Click <strong>API Tokens<\/strong> from the left menu, then click the <strong>Create Token<\/strong> button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"297\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-1024x297.png\" alt=\"\" class=\"wp-image-3386\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-1024x297.png 1024w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-300x87.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-768x223.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-1536x445.png 1536w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-2048x594.png 2048w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step2-1-360x104.png 360w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>3. Scroll down and click the <strong>Commencer<\/strong> button next to the <strong>Create Custom Token<\/strong> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"322\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1-1024x322.png\" alt=\"\" class=\"wp-image-3388\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1-1024x322.png 1024w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1-300x94.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1-768x241.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1-360x113.png 360w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step3-1.png 1458w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>4. Under <strong>Token Name<\/strong>, enter a descriptive internal name for the token, such as &#8220;<strong>FastPixel<\/strong>&#8220;.<\/p>\n\n\n\n<p>5. Under Permissions, select &#8220;<strong>Zone<\/strong>&#8221; &gt; &#8220;<strong>Cache Purge<\/strong>&#8221; &gt; &#8220;<strong>Purge<\/strong>&#8221; from the three dropdown menus.<\/p>\n\n\n\n<p class=\"has-palette-color-6-background-color has-background\">If you see &#8220;<strong>Edit<\/strong>&#8221; instead of &#8220;<strong>Purge<\/strong>&#8221; in the third dropdown menu, you can select that option instead.<\/p>\n\n\n\n<p>6. Under Zone Resources, select &#8220;<strong>Include<\/strong>&#8221; &gt; &#8220;<strong>Specific zone<\/strong>&#8221; &gt; &#8220;<strong>Your Domain<\/strong>&#8221; from the three dropdown menus. Note that your site must be added to your Cloudflare account for the domain to appear in the third dropdown, as shown in the screenshot below.<\/p>\n\n\n\n<p class=\"has-palette-color-6-background-color has-background\">If you have multiple websites, you have two options: either click the &#8220;<strong>+ Add more<\/strong>&#8221; link to add the desired domains, or select &#8220;<strong>All zones<\/strong>&#8221; from the second dropdown menu to create the token for all your websites at once.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"483\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-1024x483.png\" alt=\"\" class=\"wp-image-3390\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-1024x483.png 1024w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-300x142.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-768x362.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-1536x725.png 1536w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1-360x170.png 360w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step4-1.png 1814w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>7. Scroll down, click <strong>Continue to summary<\/strong>, and then click the <strong>Create Token<\/strong> button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2-1024x244.png\" alt=\"\" class=\"wp-image-3394\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2-1024x244.png 1024w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2-300x71.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2-768x183.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2-360x86.png 360w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step5-2.png 1420w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>8. Copy the generated token and make sure to save it, as it will not be displayed again.<\/p>\n\n\n\n<p>9. Paste the token code into our plugin settings (<strong>WP Admin<\/strong> &gt; <strong>FastPixel<\/strong> &gt; <strong>Settings<\/strong> &gt; <strong>Integrations<\/strong> &gt; <strong>API Token<\/strong>).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Find the Zone ID?<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to your <strong>Cloudflare Dashboard<\/strong><\/li>\n\n\n\n<li>Click the three dots next to your domain<\/li>\n\n\n\n<li>Click <strong>Copy Zone ID<\/strong><\/li>\n\n\n\n<li>Paste the Zone ID into our plugin settings (<strong>WP Admin<\/strong> &gt; <strong>FastPixel<\/strong> &gt; <strong>Settings<\/strong> &gt; <strong>Integrations<\/strong> &gt; <strong>Zone ID<\/strong>).<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"994\" height=\"924\" src=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step6-1.png\" alt=\"\" class=\"wp-image-3396\" srcset=\"https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step6-1.png 994w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step6-1-300x279.png 300w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step6-1-768x714.png 768w, https:\/\/fastpixel.io\/wp-content\/uploads\/2025\/02\/step6-1-360x335.png 360w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>To follow the instructions below, you must have access to your Cloudflare control panel. If Cloudflare was set up through your hosting provider (e.g., SiteGround, WP Engine, Kinsta, etc.), you will not be able to proceed unless they grant you access to your Cloudflare control panel. Alternatively, you can disable the Cloudflare integration with your [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","footnotes":""},"doc_category":[13],"doc_tag":[],"class_list":["post-3360","docs","type-docs","status-publish","hentry","doc_category-fastpixel-website-accelerator"],"blocksy_meta":[],"year_month":"2026-04","word_count":408,"total_views":"407","reactions":{"happy":"4","normal":"0","sad":"0"},"author_info":{"name":"Adrian","author_nicename":"adrian","author_url":"https:\/\/fastpixel.io\/fr\/blog\/author\/adrian\/"},"doc_category_info":[{"term_name":"FastPixel Website Accelerator","term_url":"https:\/\/fastpixel.io\/fr\/docs-category\/fastpixel-website-accelerator\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"trp-custom-language-flag":false,"betterdocs-category-thumb":false},"uagb_author_info":{"display_name":"Adrian","author_link":"https:\/\/fastpixel.io\/fr\/blog\/author\/adrian\/"},"uagb_comment_info":0,"uagb_excerpt":"To follow the instructions below, you must have access to your Cloudflare control panel. If Cloudflare was set up through your hosting provider (e.g., SiteGround, WP Engine, Kinsta, etc.), you will not be able to proceed unless they grant you access to your Cloudflare control panel. Alternatively, you can disable the Cloudflare integration with your\u2026","_links":{"self":[{"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/docs\/3360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/comments?post=3360"}],"version-history":[{"count":16,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/docs\/3360\/revisions"}],"predecessor-version":[{"id":3397,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/docs\/3360\/revisions\/3397"}],"wp:attachment":[{"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/media?parent=3360"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/doc_category?post=3360"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/fastpixel.io\/fr\/wp-json\/wp\/v2\/doc_tag?post=3360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}