Python: Generate an email link

Parameters

Examples

Generate a signup link

response = supabase.auth.admin.generate_link(\{
  "type": "signup",
  "email": "email@example.com",
  "password": "secret"
\})

Generate an invite link

response = supabase.auth.admin.generate_link(\{
  "type": "invite",
  "email": "email@example.com"
\})

Generate a magic link

response = supabase.auth.admin.generate_link(\{
  "type": "magiclink",
  "email": "email@example.com"
\})

Generate a recovery link

response = supabase.auth.admin.generate_link(\{
  "type": "recovery",
  "email": "email@example.com"
\})

Generate links to change current email address

# generate an email change link to be sent to the current email address
response = supabase.auth.admin.generate_link(\{
  "type": "email_change_current",
  "email": "current.email@example.com",
  "new_email": "new.email@example.com"
\})

# generate an email change link to be sent to the new email address
response = supabase.auth.admin.generate_link(\{
  "type": "email_change_new",
  "email": "current.email@example.com",
  "new_email": "new.email@example.com"
\})