Ir para o conteúdo
NimbusNexus

Verificação de telefone

Um número de telefone verificado pode funcionar como segundo fator de reserva e como canal de recuperação no caso raro em que um usuário perdeu tanto a senha quanto o dispositivo TOTP/WebAuthn. A verificação é o fluxo padrão "enviamos um código por SMS, você o digita".

SMS como fator principal de 2FA é mais fraco que TOTP ou WebAuthn (ataques de SIM swap, problemas com o SS7). A NimbusNexus suporta 2FA por SMS, mas usa TOTP por padrão nos novos cadastros; o SMS é oferecido como caminho exclusivo de recuperação para contas do nível production. Contas Enterprise podem desativar o SMS completamente se o modelo de ameaças delas o excluir.

Próximos passos

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 →