© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2w ago•
2 replies
k4uan

How to disable direct access to table APIs and allow access only through RPC functions?

RLS🤷other🟢SQL
I have some tables that I don’t want users to access directly through the default table APIs.
Access should happen only via RPC functions, which are called internally by my system.

I tried using REVOKE ALL on the tables, but when I do that, Row Level Security (RLS) stops working, which breaks my permission logic.

Does anyone know the correct way to:

- Block direct access to tables

- Keep RLS enabled and working

- Allow access only through RPC functions?
image.png
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

Long run functions through RPC
SupabaseSSupabase / help-and-questions
2mo ago
Allow RPC only for RLS query
SupabaseSSupabase / help-and-questions
4y ago
Securing access to database functions only
SupabaseSSupabase / help-and-questions
4y ago
How can I allow authenticated users to access only certain columns from a table ?
SupabaseSSupabase / help-and-questions
13mo ago