© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
27 replies
Åskkuken

Supabase service_role_key not bypassing RLS

I am running supabase locally and using supabase kt (kotlin). I am using the 'Secret key' that is generated when starting supabase locally. I am creating my client with the same key but am continuously receiving "Permission denied" errors aka
42501
42501
. Am i using the wrong key? How can i fix this.

private val client = createSupabaseClient(SUPABASE_URL, SERVICE_ROLE_KEY) {
        install(Functions)
        install(Postgrest)
        install(Auth)
    }
private val client = createSupabaseClient(SUPABASE_URL, SERVICE_ROLE_KEY) {
        install(Functions)
        install(Postgrest)
        install(Auth)
    }
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

Service role not bypassing RLS
SupabaseSSupabase / help-and-questions
3y ago
JWT Service Role Key
SupabaseSSupabase / help-and-questions
3d ago
understanding service_role key
SupabaseSSupabase / help-and-questions
3y ago
Hiding Service Role Key
SupabaseSSupabase / help-and-questions
4y ago