RUAL Documentation

POST /twofactorauth

Create a new two-factor authentication method for the current user

Create a new two-factor authentication method for the current user
Key Type Example
authorization required string
"Bearer your-jwt-token"
Key Type Example Description
type required string
"totp"
Type of 2FA method
name optional string
"My TOTP Device"
Display name for the 2FA method
phone_number optional string
"+1234567890"
Phone number for SMS 2FA (required for SMS type)
secret optional string
"example-string"
TOTP secret key (for TOTP type)
app_identifier optional string
"example-string"
App identifier for app-based 2FA
{ "_meta": { "guid": "example-string", "entity": "example-value", "created": "example-value", "modified": "example-value", "updated": "example-value" }, "user_guid": "example-string", "type": "totp", "name": "My TOTP Device", "phone_number": "+1234567890", "default": true, "verified": true, "app_identifier": "example-string" }
{ "success": false, "error": "HTTP_401", "message": "Error response" }
Error Code Description
HTTP_401 HTTP 401 error
permission description
BearerAuth JWT access token obtained from login endpoint required

Back to Two-Factor Authentication Return to the Two-Factor Authentication category to view other endpoints All API Categories Browse all available API categories