# Firebase callable function blocked by CORS or 403: wrong region or function not invokable

**Code:** `callable CORS` · **Category:** Google Cloud / Firebase · **Seen on:** Firebase, JavaScript

The browser reports a CORS error calling `httpsCallable`, usually because the function URL/region is wrong or unauthenticated invocation is blocked.

## Meaning

Initialise the client with the function's region (`getFunctions(app, "europe-west1")`), make sure the callable exists, and for 2nd gen allow invocations (`invoker: "public"`) and configure `cors`. A CORS error often hides a 404/403 from the wrong region.

## Common causes

- Function region differs from the client's
- Function name typo / not deployed
- 2nd gen function not public
- Org policy blocks `allUsers`
- Wrong emulator port settings

## Quick fix

1. Pass the correct region to `getFunctions`
2. Set `invoker: "public"`/`cors: true` for 2nd gen callables
3. Check the deployed URL in the console

## Detailed fix by platform

### JavaScript

1. 

```javascript
const functions = getFunctions(app, "europe-west1");
const fn = httpsCallable(functions, "createInvoice");
```


## How to diagnose

1. **Region** — Matches?
2. **Invoker** — public?
3. **Name** — Correct?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/gcp/firebase-functions-cors-callable-unauthenticated)
