/netsapiensjs reports mfa_required_setup. The server checks username and password, then checks mfa_passcode against mfa_key, and saves only when both pass. The enrollment is published to the platform and takes effect once it is applied, so a login made immediately afterwards may not see it yet. Wrong credentials return 409, and a wrong passcode returns 401: ask the user for a fresh code and try again. If the user already has a token, use /oauth/mfaEnrollWithToken instead.curl --location 'https://awqacore01.crexendocloud.com/ns-api/v2/oauth/mfaEnroll' \
--header 'Content-Type: application/json' \
--data-raw '{
"ns_id": "1001@example.com",
"ns_id_type": "subscriber",
"mfa_key": "JBSWY3DPEHPK3PXP",
"mfa_vendor": "google",
"mfa_type": "authenticator",
"mfa_passcode": "123456",
"username": "1001@example.com",
"password": "{{user_password}}"
}'{
"status": "success",
"message": "MFA enrollment successful",
"enrolled": true,
"apiversion": "46.0.0"
}