403 Forbidden on `wrangler dev`

I am trying to get started with my first workers project, and after running wrangler login successfully and creating a sample project, I am running wrangler dev and it is returning the following error:

Error: HTTP status client error (403 Forbidden) for url (https://api.cloudflare.com/client/v4/accounts/[redacted id]/workers/subdomain/edge-preview)

Any ideas?

Do wrangler whoami and check that the ID(s) there matches the one you’re seeing in your wrangler dev URL. If it doesn’t, it means you’re using the wrong ID in your wrangler.toml

There was nothing in wrangler.toml > account_id, but I am still getting the error. Here is the rest of wrangler.toml:

name = "formup"
type = "javascript"

account_id = "653c..."
workers_dev = true
route = ""
zone_id = ""
compatibility_date = "2021-09-19"

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.