Python: Update a user

Parameters

Examples

Updates a user's email

response = supabase.auth.admin.update_user_by_id(
  "11111111-1111-1111-1111-111111111111",
  \{ "email": "new@email.com" \}
)

Updates a user's password

response = supabase.auth.admin.update_user_by_id(
  "6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4",
  \{ "password": "new_password" \}
)

Updates a user's metadata

response = supabase.auth.admin.update_user_by_id(
  "6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4",
  \{ "user_metadata": \{ "hello": "world" \} \}
)

Updates a user's app_metadata

response = supabase.auth.admin.update_user_by_id(
  "6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4",
  \{ "app_metadata": \{ "plan": "trial" \} \}
)

Confirms a user's email address

response = supabase.auth.admin.update_user_by_id(
  "6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4",
  \{ "email_confirm": True \}
)

Confirms a user's phone number

response = supabase.auth.admin.update_user_by_id(
  "6aa5d0d4-2a9f-4483-b6c8-0cf4c6c98ac4",
  \{ "phone_confirm": True \}
)