> ## Documentation Index
> Fetch the complete documentation index at: https://takeprofit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Two-Factor Authentication (2FA)

> Turn on two-factor authentication, save your recovery codes, sign in with a one-time code, and create personal API tokens.

Two-Factor Authentication adds another layer of security to your TakeProfit account. When 2FA is enabled, logging in requires both your password and a time-based one-time code from an authenticator app or a saved recovery code.

It matters most if you have [connected an exchange account](https://takeprofit.com/docs/guide/trading/brokers). Your API keys never allow withdrawals, so nobody can move your funds from here — but someone in your account could still place orders against your positions, read your scripts, and change your alerts. A password alone is one leak away from that.

***

## Enabling Two-Factor Authentication

You can activate 2FA in your profile settings.

### 1. Open **Settings → Login & Security**

In the **Two-Factor Authentication** row, select **Connect**. The **Set Up Two-Factor Authentication** dialog opens.

### 2. Scan the QR code or use the manual key

![](https://mintcdn.com/takeprofit-a5dc0462/zMiYy-myPelgH2JI/images/guide/getting-started/1.13.1_2FA.png?fit=max\&auto=format\&n=zMiYy-myPelgH2JI\&q=85\&s=f4a77d4675ae10bb9f4450cd610834de)

The setup dialog displays:

* A QR code to scan with an authenticator app — Google Authenticator, Authy, Microsoft Authenticator and 1Password all work
* A manual setup key if you prefer entering it by hand

The QR code expires after 5 minutes. Click the refresh icon on it to get a new one.

After adding the key, your authenticator app will start generating 6-digit one-time codes that refresh every 30 seconds.

### 3. Enter the 6-digit authentication code

Type the current 6-digit code from your authenticator app, or click **Paste** to paste it. The code is checked as soon as all 6 digits are in.

If something is wrong, you see a message under the field, for example:

* “The code you entered is incorrect. Check your authenticator app and try again.”
* “This code has expired. Generate a new one and try again.”
* “Too many attempts. Wait a few minutes and try again.”

When the code is accepted, the setup continues to the backup codes step.

***

## Saving Backup Recovery Codes

After verification, the **Save Backup Codes** step shows your recovery codes.

These codes:

* Can be used if you lose access to your authenticator app
* Are displayed only once
* Should be stored securely

You can copy them using **Copy Codes** or save manually.\
When done, select **I've Saved Them**.

The dialog then shows **Two-Factor Authentication Is On**. Select **Done** to close it. Your profile settings now show 2FA as **Enabled**.

***

## Using 2FA During Login

When 2FA is enabled, an additional verification step appears after entering your email and password.

### 1. Enter the 6-digit code from your authenticator app

Open the app and type the current 6-digit code. It is checked as soon as all 6 digits are in.

If the code is wrong or has expired, a message under the field says so. Wait for a fresh code and try again.

### 2. Using a backup recovery code

If you do not have access to your authenticator app:

* Select **Use recovery code instead**
* Enter one of the single-use backup codes you saved during setup and select **Verify**

Each backup code can be used only once.

***

## Disconnecting 2FA

![](https://mintcdn.com/takeprofit-a5dc0462/zMiYy-myPelgH2JI/images/guide/getting-started/1.13.2_2FA.png?fit=max\&auto=format\&n=zMiYy-myPelgH2JI\&q=85\&s=405efd0771bf2e3eb239d30b88fe7841)

You may remove 2FA from your account at any time.

### 1. Go to **Settings → Login & Security**

In the **Two-Factor Authentication** row, select **Disconnect**.

### 2. Confirm removal

The **Disconnect Authenticator App** dialog asks for either:

* A valid 6-digit code from your authenticator app
* One of your backup recovery codes (select **Use recovery code instead**)

Select **Disconnect** to confirm. 2FA is turned off, and the row shows **Connect** again.

***

## Personal API Tokens

**Settings → Login & Security** also holds **Personal API Tokens**, directly under Two-Factor Authentication. A token is the key for the [Platform API](https://takeprofit.com/docs/platform-api/overview): it lets your own code, notebooks and bots pull TakeProfit market data.

* Tokens are available on paid plans. Without a subscription the block shows **Upgrade Plan and Generate**, which opens the plans page.
* **Generate New Token** asks for a name and shows the full token **only once** — copy it then. Afterwards the list shows a masked prefix and a **Revoke** button.
* If your subscription ends, all your tokens are revoked automatically.

Creating, sending and revoking a token are covered step by step in [Platform API → Authentication](https://takeprofit.com/docs/platform-api/authentication.md).

***

## Troubleshooting

If you see “Something went wrong. Try again or contact support if the issue persists.”, it is usually a temporary issue. Try again after a short pause.\
If it keeps happening, contact [TakeProfit Support](mailto:support@takeprofit.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.