Update the two-factor type
Validates the requested 2fa type can be set - checks we have a valid and verified TOTP or SMS OTP setup.
Headers
-
Content-Type string
-
Accept string
Body Required
-
The type of 2fa to set for the user. Possible values are
otp|sms|either|disabled
POST /api/v1/me/otp/settings
curl \
-X POST https://api.plannrcrm.com/api/v1/me/otp/settings \
-H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"two_factor_type":"otp"}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json
# Payload
{
"two_factor_type": "otp"
}
Response examples (422)
{
"errors": {
"two_factor_type": [
"Unable to set the two_factor_type to \"sms\" because the sms two factor setup is not complete"
]
},
"message": "Unable to set the two_factor_type to \"sms\" because the sms two factor setup is not complete."
}