Send an email invite link
Sends an invite link to an email address.
- Requires a
service_role
key. - This function should only be called on a server. Never expose your
service_role
key in the browser. - The
inviteUserByEmail()
method is typically used by administrators to invite users to join the application.
Parameters
email
REQUIRED
stringThe email address of the user.
options
Optional
objectdata
Optional
objectredirectTo
Optional
string
const { data: user, error } = await supabase.auth
.api
.inviteUserByEmail('[email protected]')