latest
  • latest
  • v1.0.0
Platform
Platform
  • Staging
  • Prod
CRM
CRM
  • Staging
  • Staging
App
App
  • AppStore (PROD)
  • Playstore (PROD)
  • AppStore (Staging)
  • Playstore (Staging)
Infra
Infra
  • GCP (Cloud)
  • Resend (Email)
  • Cloudflare (CDN)
Platform
Platform
  • Staging
  • Prod
CRM
CRM
  • Staging
  • Staging
App
App
  • AppStore (PROD)
  • Playstore (PROD)
  • AppStore (Staging)
  • Playstore (Staging)
Infra
Infra
  • GCP (Cloud)
  • Resend (Email)
  • Cloudflare (CDN)
latest
  • latest
  • v1.0.0
latest
  • latest
  • v1.0.0
  1. Better Auth - Two-factor
  • Back to home
  • Core API
  • auth
    • Auth
      • Sign-up account
      • Sign-in account
      • Forgot Password
      • Reset Password
      • Send email verification OTP
      • Check Username Availability
      • Verify email OTP
    • Admin
      • List Users
      • Create User
      • Get Auth User by ID
      • Update Auth User
      • Delete User
    • Health
      • Health Check
      • Health Stats
    • Better Auth - Default
      • socialSignIn
      • getSession
      • signOut
      • signUpWithEmailAndPassword
      • signInEmail
      • resetPassword
      • verifyPassword
      • /auth-service/auth/verify-email
      • sendVerificationEmail
      • changeEmail
      • changePassword
      • updateUser
      • deleteUser
      • requestPasswordReset
      • resetPasswordCallback
      • listUserSessions
      • /auth-service/auth/revoke-session
      • /auth-service/auth/revoke-sessions
      • /auth-service/auth/revoke-other-sessions
      • linkSocialAccount
      • listUserAccounts
      • /auth-service/auth/delete-user/callback
      • /auth-service/auth/unlink-account
      • /auth-service/auth/refresh-token
      • /auth-service/auth/get-access-token
      • /auth-service/auth/account-info
      • /auth-service/auth/ok
      • /auth-service/auth/error
    • Better Auth - Jwt
      • getJSONWebKeySet
      • getJSONWebToken
    • Better Auth - Username
      • /auth-service/auth/sign-in/username
      • /auth-service/auth/is-username-available
    • Better Auth - Admin
      • setUserRole
      • getUser
      • createUser
      • updateUser
      • listUsers
      • listUserSessions
      • unbanUser
      • banUser
      • impersonateUser
      • /auth-service/auth/admin/stop-impersonating
      • revokeUserSession
      • revokeUserSessions
      • removeUser
      • setUserPassword
      • /auth-service/auth/admin/has-permission
    • Auth events
      • Auth user modified
      • Get User Account by UID
      • Create Organisation
      • Create Organisation Member Invitation
      • Accept Organisation Member Invitation
      • Reject Organisation Member Invitation
      • Get Organization by ID
      • Cancel Organisation Member Pending Invitation
      • Remove Organisation Member
    • Better Auth - Organization
      • /auth-service/auth/organization/create
      • /auth-service/auth/organization/update
      • /auth-service/auth/organization/delete
      • setActiveOrganization
      • getOrganization
      • /auth-service/auth/organization/list
      • createOrganizationInvitation
      • /auth-service/auth/organization/cancel-invitation
      • /auth-service/auth/organization/accept-invitation
      • /auth-service/auth/organization/get-invitation
      • /auth-service/auth/organization/reject-invitation
      • /auth-service/auth/organization/list-invitations
      • /auth-service/auth/organization/get-active-member
      • /auth-service/auth/organization/check-slug
      • /auth-service/auth/organization/remove-member
      • updateOrganizationMemberRole
      • /auth-service/auth/organization/leave
      • /auth-service/auth/organization/list-user-invitations
      • /auth-service/auth/organization/list-members
      • /auth-service/auth/organization/get-active-member-role
      • /auth-service/auth/organization/has-permission
    • Better Auth - Two-factor
      • /auth-service/auth/two-factor/get-totp-uri
        POST
      • /auth-service/auth/two-factor/verify-totp
        POST
      • /auth-service/auth/two-factor/send-otp
        POST
      • /auth-service/auth/two-factor/verify-otp
        POST
      • /auth-service/auth/two-factor/verify-backup-code
        POST
      • /auth-service/auth/two-factor/generate-backup-codes
        POST
      • /auth-service/auth/two-factor/enable
        POST
      • /auth-service/auth/two-factor/disable
        POST
    • Better Auth - OauthProvider
      • /auth-service/auth/oauth2/authorize
      • /auth-service/auth/oauth2/consent
      • /auth-service/auth/oauth2/continue
      • /auth-service/auth/oauth2/token
      • /auth-service/auth/oauth2/introspect
      • /auth-service/auth/oauth2/revoke
      • /auth-service/auth/oauth2/userinfo
      • /auth-service/auth/oauth2/end-session
      • /auth-service/auth/oauth2/register
      • /auth-service/auth/oauth2/create-client
      • /auth-service/auth/oauth2/get-client
      • /auth-service/auth/oauth2/public-client
      • /auth-service/auth/oauth2/get-clients
      • /auth-service/auth/oauth2/update-client
      • /auth-service/auth/oauth2/client/rotate-secret
      • /auth-service/auth/oauth2/delete-client
      • /auth-service/auth/oauth2/get-consent
      • /auth-service/auth/oauth2/get-consents
      • /auth-service/auth/oauth2/update-consent
      • /auth-service/auth/oauth2/delete-consent
    • Better Auth - Email-otp
      • sendEmailVerificationOTP
      • verifyEmailWithOTP
      • /auth-service/auth/email-otp/verify-email
      • signInWithEmailOTP
      • requestPasswordResetWithEmailOTP
      • forgetPasswordWithEmailOTP
      • resetPasswordWithEmailOTP
  • user
    • User
      • Get All Users
      • Get User by ID
    • Account
      • Get User Account
      • Delete Account
      • List history of user update requests
      • Get pending user update request
      • Update account
      • Enable/Disable isSalesAgent for a User
      • Send Welcome Email
      • Update work experience
      • Change Password
    • User KYC
      • Initiate new user KYC
      • Get User KYC History
      • Get Latest KYC
      • Update Aadhaar KYC Document and Send OTP
      • Verify Aadhaar OTP and Update KYC Document
      • Verify PAN and Update KYC Document
      • Verify Driving License and Update KYC Document
      • Verify Passport and Update KYC Document
      • Update KYC Document for User
      • Submit User KYC
      • Delete User KYC
    • Manage
      • Get all User KYC Requests
      • Get KYC Record
      • Update KYC Request Status
      • Get all User Update Requests
      • Get User Update Request by ID
      • Update Status of the User Update Request
    • Health
      • PostgreSQL Connection Check
      • Health Check
    • User Event
      • Create User Event
      • Modify User Event
      • Update Request Approved User Event
      • Update Request Rejected User Event
    • Verify Email
      • Send OTP to Email for Verification
      • Confirm Email Verification
      • Resend OTP to Email for Verification
  • activity
    • Activity
      • Get All Activities
      • Get activities by user ID
      • Get Activity By ID
      • Update Activity
      • Delete Activity
      • Create Activity
    • Activity Event
      • Create User Activity
      • Create Business Activity
      • Create Catalog Activity
      • Create Tender Activity
      • Create Enquiry Activity
      • Create Bid Activity
      • Create Wallet Activity
    • Health
      • PostgreSQL Connection Check
      • Health Check
  • business
    • Business
      • Get All Businesses
      • Get Business
      • Delete Business
      • Verify business email
      • Create Business
      • List My Businesses
      • Upload Business Logo
      • Upload Business Cover Image
      • Send verification email
      • Resend verification email
      • List history of business update requests
      • Get pending business update request
      • Update Business
    • Business Team Member
      • List business team members
      • Get a single team member
      • Update a team member
      • Remove a team member
      • Add a team member
      • Accept business invite
      • Cancel business invite
      • Reject business invite
      • Get list of pending invites
    • Business KYC
      • Get Business KYC History
      • Get Latest Business KYC by Business ID
      • Initiate New Business Kyc
      • Update KYC Document For Business
      • Verify PAN and Update KYC Document
      • Verify GST and Update KYC Document
      • Submit BusinessKyc
      • Verify CIN and Update KYC Document
      • Delete BusinessKyc
      • Verify Udyam and Update KYC Document
    • Admin
      • Update Business
      • Delete Business
    • Manage
      • Get All Business KYC Records
      • Get KYC Record
      • Update KYC Status
      • Get All Update Requests
      • Get Update Request
      • Update Status
      • Get All Businesses
    • Health
      • PostgreSQL Connection Check
      • Health Check
      • Health Stats
  • tender
    • Tender
      • List all Tenders
      • Get Tender
      • Batch get tenders
    • Admin
      • Update Tender
      • Delete Tender
    • Manage
      • List all Tenders
      • Get Tender
      • Publish Tender
      • Get All Update Requests
      • Get Update Request
      • Update Status
      • List Bids
      • Award Bid
    • Health
      • Health Check
    • Tender-Host
      • Delete Tender
      • Create Tender
      • List business tenders
      • List Bids
      • Get business tender
      • List business tender bids
      • List history of tender update requests
      • Get pending tender update request
      • Update Tender
    • Tender-Bids
      • Check Tender Bid
      • List my bids
      • Place a bid
      • Withdraw bid
      • Update Bid
  • master
    • Category Admin
      • List Categories
      • Create Category
      • Update Category
      • Delete Category
    • Category
      • Get Category
      • List Categories
    • Industry Admin
      • List Industries
      • Create Industry
      • Update Industry
      • Delete Industry
    • Industry
      • Get Industry
      • List Industries
    • Health
      • Health Check
  • enquiry
    • Enquiry
      • Create Enquiry
      • Approve / Reject Enquiry Action
      • Close Enquiry Action
      • List User Enquiries
      • List Business Enquiries
      • Get Enquiry by ID
    • Admin
      • List Admin Enquiries
      • Get Enquiry by ID
      • Delete Enquiry
    • Health
      • PostgreSQL Connection Check
      • Health Check
  • catalog
    • Catalog
      • List Catalogs
      • Get Catalog
      • Delete Catalog
      • Create Catalog
      • List history of catalog update requests
      • Get pending catalog update request
      • Upload Catalog Image
      • Update Catalog
    • Catalog Variant
      • List Catalog Variants
      • Get Catalog Variant
      • Delete Catalog Variant
      • Create Catalog Variant
      • Update Catalog Variant
      • Get Catalog Variant History
      • Get Pending Catalog Variant
    • Admin
      • Update Catalog
      • Delete Catalog
      • Update Catalog Variant
      • Delete Catalog Variant
    • Manage
      • Get All Catalogs
      • Get Catalog
      • Update Catalog Status
      • Get All Update Requests
      • Get Update Request
      • Update Catalog Req. Status
      • Get All Catalog Variants
      • Get Catalog Variant
      • Update Variant Status
      • Get All Variant Update Requests
      • Get Variant Update Request
      • Update Variant Req. Status
    • Health
      • PostgreSQL Connection Check
      • Health Check
  • billing
    • Billing Account
      • List billing accounts
      • Get billing account by ID
      • Update billing account
      • Delete billing account
      • Create billing account
    • Billing Account Access
      • List billing account accesses
      • Get billing account access by ID
      • Update billing account access
      • Revoke billing account access
      • Grant billing account access
    • Invoice
      • List invoices
      • Get invoice by ID
    • Invoice Payment
      • List invoice payments
      • Get invoice payment by ID
      • Create invoice payment
    • Admin - Billing Account
      • List billing accounts
      • Get billing account by ID
      • Delete billing account
      • Update billing account status
    • Admin - Invoice Item
      • Create invoice item
      • Update invoice item
      • Delete invoice item
    • Admin - Invoice
      • List invoices
      • Get invoice by ID
      • Update invoice
      • Delete invoice
      • Create invoice
    • Admin - Invoice Payment
      • List invoice payments
      • Get invoice payment by ID
      • Update invoice payment
      • Delete invoice payment
      • Create invoice payment
    • Health
      • Health Check
      • Health Stats
  • wallet
    • Wallet
      • Get wallet by user
      • Get wallet by business ID
      • Create wallet
      • Update wallet
    • Wallet Transaction
      • List wallet transactions
      • Get wallet transaction by ID
    • Manage - Wallet Transaction
      • List wallet transactions
      • Get wallet transaction by ID
      • Update wallet transaction
      • Delete wallet transaction
      • Create wallet transaction
    • Manage - Wallet
      • List wallets
      • Get wallet by ID
      • Update wallet
      • Delete wallet
      • Create wallet
    • Health
      • Health Check
      • Health Stats
  • handler
    • Event Handling
      • Handle Pub/Sub Messages
    • Health
      • Health Check
  1. Better Auth - Two-factor

/auth-service/auth/two-factor/enable

Staging Env
https://api.stg.bidancer.com
Staging Env
https://api.stg.bidancer.com
POST
https://api.stg.bidancer.com
/auth-service/auth/two-factor/enable
Last modified:2026-03-23 05:58:49
Use this endpoint to enable two factor authentication. This will generate a TOTP URI and backup codes. Once the user verifies the TOTP URI, the two factor authentication will be enabled.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Successful response
Body

🟠400
🟠401
🟠403
🟠404
🟠429
🔴500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.stg.bidancer.com/auth-service/auth/two-factor/enable' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "password": "string",
    "issuer": "string"
}'
Response Response Example
200 - Example 1
{
    "totpURI": "string",
    "backupCodes": [
        "string"
    ]
}
Modified at 2026-03-23 05:58:49
Previous
/auth-service/auth/two-factor/generate-backup-codes
Next
/auth-service/auth/two-factor/disable
Built with