Перейти до вмісту
NimbusNexus

Підтвердження телефону

Підтверджений номер телефону може слугувати резервним другим фактором і каналом відновлення в тих рідкісних випадках, коли користувач утратив і пароль, і свій пристрій TOTP/WebAuthn. Підтвердження відбувається за стандартною схемою «ми надсилаємо код у SMS, ви його вводите».

SMS як основний фактор 2FA слабший за TOTP чи WebAuthn (атаки з підміною SIM-картки, вразливості SS7). NimbusNexus підтримує 2FA через SMS, але для нових підключень другого фактора за замовчуванням використовує TOTP; для акаунтів рівня production SMS пропонується лише як шлях відновлення. Акаунти Enterprise можуть повністю вимкнути SMS, якщо їхня модель загроз його виключає.

Що далі

Reference

GET/api/v1/phone/

Retrieve Phone

Return the verified phone number on file for the current user, if any.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/phone/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/phone/

Add Phone

Stage a phone number for the current user and send a one-time SMS verification code to it.

Request body

FieldTypeDescription
phone_code*string—
phone_number*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/phone/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone_code": "example",
    "phone_number": "example"
  }'
DELETE/api/v1/phone/

Delete Phone

Remove the current user's verified phone number and disable two-factor authentication.

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/phone/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/phone/phone_passcode_validation

Phone Passcode Validation

Validate the SMS passcode and promote the staged phone number to verified.

Request body

FieldTypeDescription
passcode*string—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/phone/phone_passcode_validation" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "passcode": "example"
  }'

Need to make a real call? Try these endpoints in the live Swagger UI →