Skip to main content

generateLink()

Generates links to be sent via email or other.

Parameters

  • typerequiredsignup | magiclink | recovery | invite | email_change_current | email_change_new

    The link type ("signup" or "magiclink" or "recovery" or "invite").

  • emailrequiredstring

    The user's email.

  • optionsrequiredobject

    No description provided.

      Properties
    • dataoptionalobject

      No description provided.

    • passwordoptionalstring

      No description provided.

    • redirectTooptionalstring

      No description provided.

Notes

  • Requires a service_role key.
  • This function should only be called on a server. Never expose your service_role key in the browser.

Examples

const { data: user, error } = await supabase.auth.api.generateLink(
'invite',
'email@example.com'
)