© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•6mo ago•
10 replies
Ben H

not sure how to use new api secret key

hey folks

i disabled the legacy api keys and created the new api keys, so now i have a publishable key and a secret key named default. but i was a little confused about using the secret key, as it doesn't appear to have a reserved name like the old service role key did. in my local .env file i created a new variable SB_SECRET_KEY and set it equal to the secret API key copied from the supabase dashboard. then i set this new secret using the command line, so now i see it in the edge function secrets. but this didn't feel like the right way to use it - it seems like i just created a new edge function secret. or is that really what we're supposed to do? i did the same for the publishable key, that is i made a new edge function secret SB_PUBLISHABLE_KEY

thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to use the secret key
SupabaseSSupabase / help-and-questions
4d ago
HOW TO USE JWT SECRET
SupabaseSSupabase / help-and-questions
5mo ago
Edgefunction Secret key
SupabaseSSupabase / help-and-questions
6mo ago
Secret Access Key
SupabaseSSupabase / help-and-questions
3y ago