New advertisers: 50% off your first month with code FIRSTMONTHSee slots
okou-ai avatar

Cloudflare Tunnel

Curl-based guide for calling services behind Cloudflare Access using service token headers.

skills.sh installs
870
GitHub stars
81
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers authenticated curl requests to tunnel-protected endpoints, including GET, POST with JSON bodies, and file downloads
  • Includes header patterns for combining Cloudflare Access service tokens with Bearer, Basic, or service-specific auth
  • Documents the two required headers, CF-Access-Client-Id and CF-Access-Client-Secret, plus a table of common 403 and 401 errors
  • Designed for agents calling internal services exposed through a Cloudflare Tunnel that need service-token access

Install

$ npx -y skills add okou-ai/okou-skills --skill cloudflare-tunnel -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Usage

Basic curl Request

Add two headers to authenticate through Cloudflare Access:

curl -s \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET" \
  "https://your-protected-service.example.com/api/endpoint"

With Additional Authentication

Many services require both Cloudflare Access AND their own authentication:

curl -s \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET" \
  -H "Authorization: Bearer $API_TOKEN" \
  "https://your-protected-service.example.com/api/endpoint"

With Basic Auth

curl -s \
  -H "CF-Access-Client-Id: $CF_ACCESS_CLIENT_ID" \
  -H "CF-Access-Client-Secret: $CF_ACCESS_CLIENT_SECRET" \
  -u "username:password" \
  "https://your-protected-service.example.com/api/endpoint"

POST Request with JSON Body

Write to /tmp/request.json:

{
  "key": "value"
}

Then run:

Details

Repository
github.com/okou-ai/okou-skills
Categories
DevOps & Cloud, Backend & APIs
First seen
May 16, 2026

More from okou-ai/okou-skills

All 2

Similar to Cloudflare Tunnel

More DevOps & Cloud