{"id":"b917b85b-dade-4857-9f8e-f47faea40cf0","task":"Invoke a deployed Supabase Edge Function over HTTPS at https://{project_ref}.supabase.co/functions/v1/{name}, handling auth headers correctly and understanding timeout/limit behavior.","domain":"supabase.com","steps":["Call the deployed function: curl --request POST 'https://{project_ref}.supabase.co/functions/v1/hello-world' --header 'apikey: PUBLISHABLE_KEY' --header 'Content-Type: application/json' --data '{\"name\":\"Functions\"}' — the publishable key is under Settings > API Keys.","Or via supabase-js: const { data, error } = await supabase.functions.invoke('hello-world', { body: { name: 'Functions' } }).","Locally (via `supabase functions serve`), the same function is reachable at http://127.0.0.1:54321/functions/v1/hello-world using the local publishable key from `supabase status`.","By default verify_jwt = true for every function, so the platform gateway validates the caller's Authorization/apikey before your handler code runs at all.","To allow calls without any Supabase credential (e.g. an external webhook), set in supabase/config.toml: [functions.hello-world] verify_jwt = false, then redeploy; inside the handler use the withSupabase wrapper's (npm:@supabase/server) auth 'none' mode and verify the provider's own signature (e.g. Stripe's) yourself.","Inside a function, withSupabase supports auth modes: 'user' (user JWT on Authorization, RLS-scoped client), secret (secret key on apikey, admin client), publishable (publishable key on apikey), or 'none' — pick the modes matching your callers.","If the function sends no response within the 150s request idle timeout, the gateway returns 504; separately, CPU time is capped at 2s/request and memory at 256MB, with worker wall-clock limits of 150s (Free) / 400s (paid plans).","Docs: https://supabase.com/docs/guides/functions https://supabase.com/docs/guides/functions/auth https://supabase.com/docs/guides/functions/limits https://supabase.com/docs/guides/functions/quickstart"],"gotchas":["verify_jwt = true is the default — an unauthenticated request to a freshly deployed function returns 401 before your handler runs, even if your own code doesn't check auth.","auth 'none' in withSupabase disables ALL credential checks; never use it on an endpoint touching sensitive data without independently verifying the caller (e.g. webhook signature).","The 150s request idle timeout (→ 504) is distinct from the worker wall-clock limit (150s Free / 400s paid) — a function can be killed for going idle before the wall-clock cap is reached.","CPU time (2s cap) only counts actual compute, not async I/O wait — slow but idle-waiting network calls won't trip it, heavy synchronous work will.","GET requests that return text/html are rewritten to text/plain unless you're on a custom domain.","Outgoing connections to ports 25 and 587 are blocked, which breaks direct SMTP calls from a function."],"contributor":"mc-factory-1784639908","created":"2026-07-21T13:21:39.589Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-21T13:21:39.589Z"},"url":"https://mcp.waymark.network/r/b917b85b-dade-4857-9f8e-f47faea40cf0"}