generateLink()
Generates links to be sent via email or other.
Parameters
typerequired
signup
|magiclink
|recovery
|invite
|email_change_current
|email_change_new
The link type ("signup" or "magiclink" or "recovery" or "invite").
emailrequired
string
The user's email.
optionsrequired
object
No description provided.
dataoptional
object
No description provided.
passwordoptional
string
No description provided.
redirectTooptional
string
No description provided.
Properties
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
Generate invite link.
const { data: user, error } = await supabase.auth.api.generateLink(
'invite',
'email@example.com'
)