Authentication and Access
/auth
Log in and retrieve token for service access. By default, tokens must be used from the machine they were generated and will expire after a user defined time.
- rights: none, admin if ip or ttl is set
- verbs: POST
| Parameter | Type | Required |
|---|---|---|
| username | String | Yes |
| password | String | Yes |
| ip | String | No. Used to log in on behalf of a user at specified ip address. Users with admin rights can use "..." here to generate a token that can be used from any ip address. |
| ttl | long | No. Will set a custom expiration time in ms. The default ttl is defined by the token-expire-ms system parameter. |
bash
curl https://test-m1.minusonedb.com/auth \
-d "username=admin&password=passphrase"bash
m1 auth test-m1▶200 OKAuthentication token
💡 Pro Tip: Save your token to a variable and reuse it across API calls — no need to copy and paste it each time:
bash
myToken=$(curl -X POST https://test-m1.minusonedb.com/auth -d "username=username&password=password&bucket=bucketName")/user/code
Email the user a one-time verification code — the forgotten-password workflow. The code expires in 5 minutes and can be used once. The response is 200 OK whether or not the username exists, so the endpoint does not reveal which addresses have accounts.
Use the emailed code to authenticate via /auth, then set a new password with /user/password.
- rights: none
- verbs: POST
| Parameter | Type | Required |
|---|---|---|
| username | String | Yes. The account email address. |
bash
curl https://test-m1.minusonedb.com/user/code \
-d "username=youremail@email.com"bash
m1 test-m1 user/code -username youremail@email.com
200 OKwith no body — returned even for unknown usernames.
/user/password
Change user password.
- rights: none, admin if setting on behalf of another user.
- verbs: POST
| Parameter | Type | Required |
|---|---|---|
| password | String | Yes. New password. |
| username | String | No. Specify user if admin is changing another user's password. |
bash
curl https://test-m1.minusonedb.com/user/password \
-d "password=newpassphrase" \
-H "m1-auth-token: $myToken"bash
m1 test-m1 user/password -password "newpassphrase"No response when successful.


