Profile
Two Factor Secret Create
https://api.linode.com/v4/profile/tfa-enable
Generates a Two Factor secret for your User. To enable TFA for your User, enter the secret obtained from this command with the Two Factor Authentication Confirm/Enable (POST /profile/tfa-enable-confirm) command. Once enabled, logins from untrusted computers are required to provide a TFA code before they are successful.
Note: Before you can enable TFA, security questions must be answered for your User by accessing the Security Questions Answer (POST /profile/security-questions) command.
Request Samples
- Shell
- CLI
curl -H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKEN" \
-X POST \
https://api.linode.com/v4/profile/tfa-enable
Response Samples
- 200
- default
{
"expiry": "2018-03-01T00:01:01.000Z",
"secret": "5FXX6KLACOC33GTC"
}
Responses
200: Two Factor secret generated
When this Two Factor secret expires.
Your Two Factor secret. This is used to generate time-based two factor codes required for logging in. Doing this will be required to confirm TFA an actually enable it.
default: Error
What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.
The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.