Auto generate password for account created through API?

Can’t you ask for password and confirm password when a user click the “register me on the forum” checkbox?

So you can even bypass password resetting email.