authentication

User

User management and authentication

Create Free

POSThttps://api.m3o.com/v1/user/Create

Create a new user account. The email address and username for the account must be unique.

Request payload

email string

the email address

id string

optional account id

password string

the user password

profile object

optional user profile as map<string,string>

username string

the username

Response

account object

Delete Free

POSThttps://api.m3o.com/v1/user/Delete

Delete an account by id

Request payload

id string

the account id

Login Free

POSThttps://api.m3o.com/v1/user/Login

Login using username or email. The response will return a new session for successful login, 401 in the case of login failure and 500 for any other error

Request payload

email string

The email address of the user

password string

The password of the user

username string

The username of the user

Response

session object

The session of the logged in user

Logout Free

POSThttps://api.m3o.com/v1/user/Logout

Logout a user account

Request payload

sessionId string

Read Free

POSThttps://api.m3o.com/v1/user/Read

Read an account by id, username or email. Only one need to be specified.

Request payload

email string

the account email

id string

the account id

username string

the account username

Response

account object

Read Session Free

POSThttps://api.m3o.com/v1/user/ReadSession

Read a session by the session id. In the event it has expired or is not found and error is returned.

Request payload

sessionId string

The unique session id

Response

session object

Send Verification Email Free

POSThttps://api.m3o.com/v1/user/SendVerificationEmail

Send a verification email to the user being signed up. Email from will be from '[email protected]', but you can provide the title and contents. The verification link will be injected in to the email as a template variable, $micro_verification_link. Example: 'Hi there, welcome onboard! Use the link below to verify your email: $micro_verification_link' The variable will be replaced with an actual url that will look similar to this: 'https://user.m3o.com/user/verify?token=a-verification-token&rediretUrl=your-redir-url'

Request payload

email string

failureRedirectUrl string

fromName string

Display name of the sender for the email. Note: the email address will still be '[email protected]'

redirectUrl string

subject string

textContent string

Text content of the email. Don't forget to include the string '$micro_verification_link' which will be replaced by the real verification link HTML emails are not available currently.

Update Free

POSThttps://api.m3o.com/v1/user/Update

Update the account username or email

Request payload

email string

the new email address

id string

the account id

profile object

the user profile as map<string,string>

username string

the new username

Update Password Free

POSThttps://api.m3o.com/v1/user/UpdatePassword

Update the account password

Request payload

confirmPassword string

confirm new password

newPassword string

the new password

oldPassword string

the old password

userId string

the account id

Verify Email Free

POSThttps://api.m3o.com/v1/user/VerifyEmail

Verify the email address of an account from a token sent in an email to the user.

Request payload

token string

The token from the verification email