Javascript Reference v1.0

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
    string

    The email address of the user.

    options
    Optional
    object

const { data: user, error } = await supabase.auth
  .api
  .inviteUserByEmail('[email protected]')