Change Password API

Did Mail-In-a-Box have API for change password?

Yes. See tools/mail.py for an example.

1 Like

thanks josh for telling me

Is there a reason this isn’t documented with the API examples within the admin area?

Thanks

There’s no reason - someone just needs to do the work of adding the documentation.

UPDATE! The API py is now under management/cli.py but still includes and option to change a user’s password. See the file for syntax, but basically it’s:

curl -X POST -d “email=email@user.dom” -d “password=pass” https://box.yourserver.com/admin/mail/users/password --user admin@yourdom.com:password

I’m testing it out now, so standby for more details. Any info from y’all would be appreciated.

1 Like

Works both on local machine with cli.py script, as well as called from curl - make sure the admin user you include in the code DOES NOT have 2fa/totp enabled or this will not work. I’m now able to change user passwords via a form and passing to curl.

If anyone knows how to make this work with Wordpress, let me know! Thanks!