You can now spin up a Worker before sign-in! Temporary Accounts API is here!
Hi everyone, it's Shiichan! I just found an exciting new API announcement from Cloudflare, and I can't wait to tell you about it!
Cloudflare ChangelogWhat was announced?
On Cloudflare's Changelog, they announced that platforms can now create "temporary preview accounts" through Cloudflare's REST API. It's called the Temporary Accounts API, and it lets platforms like AI app builders and coding agents deploy and test a Worker before the user ever signs in to Cloudflare.
Users don't need an existing Cloudflare account, and platforms don't need write access to one either. The API also returns a "claim URL" that lets someone upgrade the temporary account into a real one later.
The story so far
This isn't a brand-new concept built from scratch. It expands the preview-and-claim flow first introduced with wrangler deploy --temporary. That flow existed as a CLI flag, but this is the first time platforms get a way to control provisioning and deployment directly from their own backend.
Cloudflare Drop, a demo for static sites, already showed this pattern: upload a site, test and share it for 1 hour, then sign in to keep it if you like it. The new API lets other platforms build that same experience for themselves.
What changes
Platforms can now take a user all the way through "generate, deploy, test" without interrupting the onboarding flow. A coding agent or AI app builder can deploy a Worker behind the scenes and immediately show the user a working URL. Only when the user actually wants to keep it do they sign in through the claim URL to make it permanent.
Dive Deep
Here's the actual flow:
- Show Cloudflare's Terms of Service and Privacy Policy in your product, and get the user's acceptance
- Request and solve a proof-of-work challenge
- Create the temporary preview account
- Deploy using the returned temporary account ID and API token
- Show the user the deployed Worker's URL and the claim URL
The challenge request looks like this:
curl "https://api.cloudflare.com/client/v4/provisioning/previews/challenge" \
-X POST \
-H "Content-Type: application/json" \
--data '{}'
You then send the solved "solution" to https://api.cloudflare.com/client/v4/provisioning/previews to create the temporary account. The proof-of-work step helps prevent the API from being abused to mass-generate disposable accounts.
Wrap-up
- Cloudflare released a Temporary Accounts API for creating temporary preview accounts via REST API
- Users don't need to sign in, and platforms don't need write access to an existing account
- It extends the preview-and-claim flow from
wrangler deploy --temporaryso platforms can control it directly from their backend - The flow is 5 steps: accept the ToS, solve a proof-of-work challenge, create the account, deploy, and show the URL
- Platforms building AI app builders or coding agents can now build their own Cloudflare Drop-style preview experience
This one is for developers building AI app builders, no-code platforms, or coding agents!