© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
10 replies
Analny Komandos

Edge Function cannot insert into table with RLS even using Service Role Key

await supabase.from("pre_login").insert({
  user_id,
  ip_address,
  user_agent,
  token,
  expires_in
});
await supabase.from("pre_login").insert({
  user_id,
  ip_address,
  user_agent,
  token,
  expires_in
});


I am using the Service Role Key inside the Edge Function. Previously I added policies, but even then the insert didn’t work.
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

Error when insert in table "profiles" with edge-function and SERVICE_ROLE_KEY
SupabaseSSupabase / help-and-questions
8mo ago
Insert row into RLS enabled table from edge function using new keys
SupabaseSSupabase / help-and-questions
7mo ago
Using service role in Edge Function
SupabaseSSupabase / help-and-questions
7mo ago
Cannot access new service role API key from Edge Function runtime
SupabaseSSupabase / help-and-questions
3mo ago