Temporary Preview Accounts: Workers Deploy, Claim URL, and REST API
How Cloudflare temporary preview accounts let you deploy Workers before login, claim within 60 minutes, and integrate via Wrangler or the provisioning REST API.
This page summarises Cloudflare Workers documentation on temporary preview accounts: deploy and test Workers (and related resources) before anyone signs in, then claim the account within a fixed window to keep deployments. The same preview-and-claim pattern appears in Cloudflare Drop for static sites and in platform backends that call the Temporary Accounts API.
Temporary preview accounts: deploy Workers without logging in first
Section titled “Temporary preview accounts: deploy Workers without logging in first”Temporary preview accounts let you put a Worker (or other supported resources) on a live URL before authenticating with Cloudflare. When the user is ready, they open a claim URL and sign in or create an account so the temporary account and its resources become permanent.
Temporary preview accounts let you deploy and test Workers before you authenticate with Cloudflare. You can then claim the account to keep its deployments and supported resources.
— Cloudflare, Claim deployments (temporary accounts)
If nobody completes the claim in time, Cloudflare deletes the temporary account and its resources. Previews are meant for onboarding, agents, and “try before you sign up”—not for production or continuous deployment.
When to use a temporary account vs a permanent account
Section titled “When to use a temporary account vs a permanent account”| Situation | Recommended approach |
|---|---|
AI agent or local tool runs wrangler deploy with no credentials |
wrangler deploy --temporary |
| Your product UI keeps users inside your onboarding while you deploy | REST API at api.cloudflare.com/client/v4/provisioning/previews |
| Production, CI/CD, or repeated automated deploys | Permanent Cloudflare account: wrangler login or API token |
For production and continuous integration and continuous deployment (CI/CD), use a permanent Cloudflare account. Authenticate with wrangler login or a Cloudflare API token.
— Cloudflare, Claim deployments (temporary accounts)
wrangler deploy --temporary: deploy from an agent or CLI without credentials
Section titled “wrangler deploy --temporary: deploy from an agent or CLI without credentials”Use Wrangler when an AI agent or command-line tool runs deployment. Wrangler handles the proof-of-work challenge, temporary credentials, and printing the claim URL.
AI agents can now deploy Workers to Cloudflare without first requiring a user to sign up, open a browser-based OAuth flow, click through the dashboard, or create an API token. When an agent tries to deploy without Cloudflare credentials, Wrangler can tell it to rerun with –temporary, then deploy the Worker to a temporary preview account.
— Cloudflare, Temporary accounts for AI agent deployments
You need Wrangler 4.102.0 or later. In an unauthenticated session, a plain wrangler deploy should tell you to rerun with --temporary.
How an unauthenticated wrangler deploy becomes a live preview
Section titled “How an unauthenticated wrangler deploy becomes a live preview”-
Install or update Wrangler to 4.102.0+ (see Claim deployments (temporary accounts) for the documented flow).
-
For agent testing, run
wrangler logoutso existing OAuth or API tokens do not conflict—--temporarysupports unauthenticated use only and errors if other credentials are present. -
Run deploy once without
--temporary; read Wrangler’s message to rerun with the flag. -
Redeploy with
--temporary, for example:npx wrangler deploy --temporary -
Note the workers.dev URL and claim URL in the output; optional redeploys reuse the cached temporary account while credentials and the claim URL remain valid.
The temporary deployment stays live for 60 minutes. During that window, the agent can verify the Worker, redeploy changes, and return both the live Worker URL and claim URL.
— Cloudflare, Temporary accounts for AI agent deployments
Wrangler stores temporary values in the current OS user’s global configuration directory. Do not share that directory between platform users. Running wrangler login or wrangler logout clears the cached temporary account.
REST API provisioning: platform-controlled preview and claim
Section titled “REST API provisioning: platform-controlled preview and claim”Use the provisioning previews REST API when your trusted backend controls account creation and deployment. The user accepts policies in your UI; your server requests a challenge, solves proof-of-work, creates the account, deploys with the returned account.id and account.apiToken, and shows only preview and claim links in the UI.
Platforms can now create temporary preview accounts through the Cloudflare REST API. This lets your platform deploy a live Worker before the user signs in to Cloudflare.
— Cloudflare, Platforms can now create Temporary Accounts via the Cloudflare API
Your platform can keep users in its onboarding flow while they generate, deploy, and test an application. Users do not need an existing Cloudflare account, and your platform does not need write access to one.
— Cloudflare, Platforms can now create Temporary Accounts via the Cloudflare API
Never return account.apiToken to the browser or client-side code. Treat claim.url as a bearer credential—only the intended user should receive it.
Proof-of-work challenge and temporary account creation
Section titled “Proof-of-work challenge and temporary account creation”-
Request a challenge (from your backend):
curl "https://api.cloudflare.com/client/v4/provisioning/previews/challenge" \-X POST \-H "Content-Type: application/json" \--data '{}' -
Solve the challenge locally: decode
seedas Base64URL (32 bytes), build a SHA-256 checkpoint chain per Claim deployments (temporary accounts), enforcekandgas positive integers andk * g≤ 64,000,000. Run the solver off the main request thread—it is CPU-intensive. -
After the user accepts Cloudflare’s Terms of Service and Privacy Policy, set
acceptTermsOfServiceto"yes"and create the account:curl "https://api.cloudflare.com/client/v4/provisioning/previews" \-X POST \-H "Content-Type: application/json" \--data '{"termsOfService": "https://www.cloudflare.com/terms/","privacyPolicy": "https://www.cloudflare.com/privacypolicy/","acceptTermsOfService": "yes","challengeToken": "<CHALLENGE_TOKEN>","solution": {"checkpoints": "<BASE64_CHECKPOINTS>"}}' -
Confirm
successis true and verifyaccount.id,account.apiToken,account.expiresAt,claim.url, andclaim.expiresAtbefore deploying. -
Deploy supported resources with the temporary token (for example Workers Script Upload API), fetch the account
workers.devsubdomain, and returnhttps://<SCRIPT_NAME>.<SUBDOMAIN>.workers.devplusclaim.urlto the user.
Temporary account provisioning is only on the default public API endpoint—not the FedRAMP High API endpoint. Creation is rate limited; Cloudflare may reject requests that fail abuse-prevention checks.
Cloudflare Drop: preview-and-claim for static sites without an account
Section titled “Cloudflare Drop: preview-and-claim for static sites without an account”Cloudflare Drop is Cloudflare’s reference UI for the same lifecycle on static assets: upload a folder or ZIP (HTML, CSS, JavaScript, images, fonts), get a one-hour live preview, share the URL, then Claim when you want a permanent deployment.
Cloudflare Drop ↗︎ lets you deploy a static site to Cloudflare without requiring a Cloudflare account to get started.
— Cloudflare, Cloudflare Drop
Upload a folder or zip file of static assets (static HTML, CSS, JavaScript, images, and fonts) and get a temporary live preview that stays live for 1 hour. During that window, you can test the site, share the preview URL, or claim the deployment to keep it.
— Cloudflare, Cloudflare Drop
After claim you can add a domain, enable observability, enable Markdown for Agents, and control access. Creating a new Cloudflare account requires email verification before continuing.
Supported products, limits, and API scope
Section titled “Supported products, limits, and API scope”Temporary credentials support a limited product set, not full account API access. Unsupported operations return authorization errors.
| Product or resource | Supported capability or limit (temporary account) |
|---|---|
| Workers | Deployments on workers.dev |
| Workers Static Assets | Up to 1,000 files; each asset up to 5 MiB |
| Workers KV | Namespace CRUD; key put/get/list/delete; bulk operations |
| D1 | One database; up to 100 MB per database and 100 MB total |
| Durable Objects | Deploy Workers with DO bindings and migrations |
| Hyperdrive | Up to two DB configurations and 10 connections |
| Queues | Up to 10 queues |
| mTLS and CA certificates | wrangler cert upload, list, delete |
Changelog announcements also list Workers, D1, Durable Objects, Hyperdrive, Queues, and SSL/TLS certificates as in-scope for agent deployments; exact caps are defined in Claim deployments (temporary accounts).
Common mistakes when using temporary preview accounts
Section titled “Common mistakes when using temporary preview accounts”- Treating the claim link like a preview link — anyone with
claim.urlcan claim ownership; deliver it only to the intended user and keep it out of logs and analytics. - Exposing
account.apiTokenin frontend responses or client-side code; keep it on the backend only. - Missing the 60-minute completion window — if claim or account expiry passes, provision again (
wrangler deploy --temporaryor a new challenge and create call). - Using
--temporarywhile logged in — existing OAuth, API token, or global API key credentials cause an error;--temporaryis not a global flag and only applies to commands that support it. - Expecting full API access — temporary tokens authorize supported resource operations only.
- Sharing Wrangler’s global config directory between users on a multi-tenant platform host.
How to check this on your site
Section titled “How to check this on your site”- With no Cloudflare credentials configured, run
wrangler deploy, follow the printed guidance, and redeploy withwrangler deploy --temporaryas described in Claim deployments (temporary accounts). - Open the printed workers.dev URL and confirm the Worker or static preview responds over HTTPS.
- Before 60 minutes elapse, open the claim URL (dashboard
claim-previewflow), sign in or create an account, and finish all claim prompts. - After a successful claim, run
wrangler loginand deploy without--temporary; confirm the Worker remains in the claimed account. - You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match your experience or the linked Cloudflare documentation, email yimasynthetic@gmail.com with the page URL and the specific statement you want clarified.