Skip to content
masterclass Buddy

Supabase · Environment Variable

SUPABASE_SERVICE_ROLE_KEY

Supabase is replacing the legacy anon and service_role keys with publishable and secret keys. Use publishable keys in client apps and secret keys in backend code, including Edge Functions.

Last updated

Syntax

SUPABASE_SECRET_KEYS=<JSON object>
headers: { apikey: <key> }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • anon
  • service_role
  • SUPABASE_PUBLISHABLE_KEYS
  • SUPABASE_SECRET_KEYS
  • SUPABASE_ANON_KEY
  • SUPABASE_SERVICE_ROLE_KEY
  • @supabase/server
  • verify_jwt

Source: Migrating to publishable and secret API keys | Supabase Docs. Checked 2026-11-03.