Add user with curl

I need to add users with curl command but I get error Incorrect username or password.
curl -X POST -d “” -d “password=s3curE_pa5Sw0rD” https://…/admin/mail/users/add

Please help me.

The API uses basic authentication. The auth token is a base64 encoded string in format email:password and only admin accounts can add users. You can use the curl --user agument to encode the auth details.

Here’s the relevant curl command:

curl -X POST "" -H  "accept: text/html" -H "Content-Type: application/x-www-form-urlencoded" -d "" --user

Thanks for your reply
In the end of command “” is Admin account?


(Some random text to allow me to reply, ignore this)

Thanks tomorrow test it.

I test your command.
This command works very well.
Thank you so much.

1 Like