Python: Create a user | Supabase Docs (original) (raw)
To confirm the user's email address or phone number, set
email_confirm
orphone_confirm
to true. Both arguments default to false.create_user()
will not send a confirmation email to the user. You can use invite_user_by_email() if you want to send them an email invite instead.If you are sure that the created user's email or phone number is legitimate and verified, you can set the
email_confirm
orphone_confirm
param totrue
.
Parameters
attributes
(Required)
undefined
Examples
With custom user metadata
response = supabase.auth.admin.create_user(
{
"email": "user@email.com",
"password": "password",
"user_metadata": {"name": "Yoda"},
}
)
Auto-confirm the user's email
response = supabase.auth.admin.create_user(
{
"email": "user@email.com",
"email_confirm": True,
}
)
Auto-confirm the user's phone number
response = supabase.auth.admin.create_user(
{
"phone": "1234567890",
"phone_confirm": True,
}
)