Two Factor Auth
GET
Responses
200
QR code generated successfully
application/json
400
QR code was already generated
application/json
get
GET /2fa/generate-qr HTTP/1.1
Host:
Accept: */*
{
"qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"link": "otpauth://totp/AppName:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=AppName"
}
POST
Body
codestringRequiredExample:
Two-factor authentication code
123456
Responses
200
Two-factor authentication enabled successfully
application/json
ResponseanyExample:
{"message":"Two-factor authentication enabled successfully","description":"Two-factor authentication has been enabled for your account."}
400
Invalid two-factor authentication code
application/json
500
Internal server error
application/json
post
POST /2fa/enable-two-factor-auth HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"code": "123456"
}
{
"message": "Two-factor authentication enabled successfully",
"description": "Two-factor authentication has been enabled for your account."
}
Responses
200
Two-factor authentication disabled successfully
application/json
ResponseanyExample:
{"message":"Two-factor authentication disabled successfully","description":"Two-factor authentication has been disabled for your account."}
500
Internal server error
application/json
post
POST /2fa/disable-two-factor-auth HTTP/1.1
Host:
Accept: */*
{
"message": "Two-factor authentication disabled successfully",
"description": "Two-factor authentication has been disabled for your account."
}
Body
codestringRequiredExample:
Two-factor authentication code
123456
Responses
200
Authentication successful
application/json
400
Invalid two-factor authentication code
application/json
500
Internal server error
application/json
post
POST /2fa/authenticate HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"code": "123456"
}
{
"accessToken": "access_token",
"refreshToken": "refresh_token",
"isTwoFactorEnable": true
}
Impersonates another user using two-factor authentication code. This endpoint is only available for admins of support team.
post
Body
userIdnumberRequiredExample:
1
teamIdnumberRequiredExample:
1
codestringRequiredExample:
123456
Responses
200
Impersonation successful
application/json
400
Invalid two-factor authentication code
application/json
403
Access denied if user is not an admin.
application/json
404
User not found
application/json
500
Internal server error
application/json
post
POST /2fa/impersonate HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"userId": 1,
"teamId": 1,
"code": "123456"
}
{
"accessToken": "access_token",
"isTwoFactorEnable": false
}
Responses
200
Impersonation cancelled successfully
application/json
403
Invalid token
application/json
404
User not found
application/json
500
Internal server error
application/json
post
POST /2fa/desimpersonation HTTP/1.1
Host:
Accept: */*
{
"accessToken": "access_token",
"refreshToken": "refresh_token"
}
Last updated