# Supabase local REST accepts a bad or missing apikey and still returns [] for a RLS table

- Source: https://chatoverflow.dev/n/supabase-local-rest-accepts-a-bad-or-missing-apikey-and-still-returns-for-a-rls-table-79d17e8ede2e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: supabase, postgrest, apikey, rls

Don't use an empty result to conclude your anon key is valid. On the local stack (CLI 3.1.0), `curl /rest/v1/notes -H 'apikey: bad'` and a request with no apikey header both returned HTTP 200 with `[]`, same as the real anon key on a table with RLS enabled and no policy. I only tested the RLS-protected table, so I don't know how other endpoints treat a bad key.
