Skip to main content
Version: v1

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").

      Properties
    • email_change_newrequiredliteral

      No description provided.

    • email_change_currentrequiredliteral

      No description provided.

    • inviterequiredliteral

      No description provided.

    • recoveryrequiredliteral

      No description provided.

    • magiclinkrequiredliteral

      No description provided.

    • signuprequiredliteral

      No description provided.

  • 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'
)