© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
BoogersLLC

inviteUserByEmail Service_Role_Key

In the Documentation --
inviteUserByEmail
inviteUserByEmail
mentions that it requires the
service_role
service_role
key.

Based on the type definition, I don't understand how I would pass the service_role key to the function. Or maybe I'm misunderstanding how the service_role key is applied?

Also, for context, this is inside an edge function. So I believe I should have access to
SUPABASE_SERVICE_ROLE_KEY
SUPABASE_SERVICE_ROLE_KEY
I just don't understand how to apply it.

const { data: user, error } = await supabaseClient.auth.api.inviteUserByEmail(
    email,
  );
const { data: user, error } = await supabaseClient.auth.api.inviteUserByEmail(
    email,
  );
unknown.png
inviteUserByEmail() | Supabase
Sends an invite link to an email address.
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

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
rotate legacy service role key?
SupabaseSSupabase / help-and-questions
4mo ago