Email codes
Sign-in with a 6-digit code sent by email.
POST
Send a verification OTP to an email
application/json- body
email*stringEmail address to send the OTP
type*stringType of the OTP
Value in
"email-verification""sign-in""forget-password""change-email"Success
application/json- response
success?booleancurl -X POST 'https://auth.example.com/api/auth/email-otp/send-verification-otp' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "type": "email-verification"}'Example Response
{ "success": true}POST
Sign in with email and OTP
application/json- body
email*stringEmail address to sign in
otp*stringOTP sent to the email
name?stringUser display name. Only used if the user is registering for the first time. Eg: "my-name"
image?stringUser profile image URL. Only used if the user is registering for the first time.
[key: string]?unknownSuccess
application/json- response
token*stringSession token for the authenticated session
user*curl -X POST 'https://auth.example.com/api/auth/sign-in/email-otp' \ -H 'Content-Type: application/json' \ -d '{ "email": "string", "otp": "string", "property1": null, "property2": null}'Example Response
{ "token": "string", "user": { "id": "string", "name": "string", "email": "string", "emailVerified": false, "image": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "role": "string", "banned": false, "banReason": "string", "banExpires": "2019-08-24T14:15:22Z", "username": "string", "displayUsername": "string", "twoFactorEnabled": false }}