POST /_system/security/methods
Create new 2FA authentication method
Create new 2FA authentication method
| Key | Type | Example | Description |
|---|---|---|---|
| authorization required | string |
"Bearer access_token"
|
Access token
|
| Key | Type | Example | Description |
|---|---|---|---|
| type required | string |
"totp"
|
2FA device type
Allowed:
totp, sms, email |
| name required | string |
"example-string"
|
Device name
|
| phone_number optional | string |
"example-string"
|
Phone number (for SMS type)
|
{
"_meta": {
"guid": "example-string",
"entity": 42,
"removed": 42,
"created": 42,
"updated": 42,
"ums": 42,
"cms": 42,
"expiry": 42,
"update_hash": "example-string"
},
"user_guid": "example-string",
"default": true,
"method": "example-string",
"name": "example-string",
"phonenumber": "example-string",
"secret": "example-string",
"token": "example-string",
"iv": "example-string"
}
{
"error": "ERROR_KEY"
}
| Permission | Description |
|---|---|
Bearer token |
Access token required via Authorization header, x-authtoken, x-token, query param, or cookie |
users_twofactorauth_create |
Required scope: users_twofactorauth_create |
Back to System Security Return to the System Security category to view other endpoints All API Categories Browse all available API categories