Profile

Two Factor Secret Create

post
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

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST \
    https://api.linode.com/v4/profile/tfa-enable

Response Samples

{
  "expiry": "2018-03-01T00:01:01.000Z",
  "secret": "5FXX6KLACOC33GTC"
}

Responses

200: Two Factor secret generated

expiry
string <date-time>

When this Two Factor secret expires.

secret
string

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

errors
array of objects
reason
string

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.

field
string

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.