> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/managing-account/set-up-2fa.md).

# Set up two-factor authentication

Learn how to set up two-factor authentication (2FA) for your profile and recover access if you lose your device.

Two-factor authentication (2FA) strengthens authentication with an additional layer of security that requires presenting an extra piece of evidence (the possession factor) to an authentication mechanism. To obtain the possession factor, you can use an authenticator like Google Authenticator, 1Password, Authy, or Microsoft Authenticator, which provides a random code that changes frequently.

In Snyk API & Web, users can set up 2FA by configuring this extra layer of authentication in their profiles.

## Set up 2FA for your profile

To set up 2FA in the Snyk API & Web app:

1. Open the dropdown menu with your username on the bottom-left corner of the navigation bar and click **Profile**.

<figure><img src="/files/EWhEFMsF1PuakwlaBvSM" alt="User profile menu in navigation bar"><figcaption></figcaption></figure>

2. In the **Two-factor authentication (2FA)** section, click **Set up**.

<figure><img src="/files/AHoDdoa3rJzys9vrRltS" alt="Two-factor authentication setup button in profile settings"><figcaption></figcaption></figure>

3. Enter your password as a security measure in the dialog that appears.
4. In the next dialog, follow the instructions:

<figure><img src="/files/CZ6I1daBPos43E7DWTX1" alt="Two-factor authentication QR code setup dialog"><figcaption></figcaption></figure>

1. Use your device to download and install a 2FA app (Google Authenticator, 1Password, Authy, Microsoft Authenticator, and so on) to provide a verification code.
2. Use the app to scan the QR Code.
3. Enter the verification code given by the app.
4. Click **Verify**.
5. 2FA is now enabled. Snyk API & Web shows a dialog with recovery codes in case you lose your device. Copy the codes, save them in a secure place, and close the dialog.

<figure><img src="/files/EKzgjd0wc9M5I3smCmlV" alt="Two-factor authentication recovery codes"><figcaption></figcaption></figure>

With 2FA set up and enabled, every time you log in to Snyk API & Web, you have a second authentication step asking you to enter the random code generated by the authenticator app installed on your device.

<figure><img src="/files/tqb88HiH1xZuME64f20W" alt="Two-factor authentication login prompt"><figcaption></figcaption></figure>

You can go to your profile and disable 2FA or update the device with the authentication app anytime. The procedure to update is similar to the setup process.

## Recover access to your account

When you have 2FA set up and enabled for your profile, you must have a device with the authenticator app to obtain the random code needed to log in to Snyk API & Web.

<figure><img src="/files/tqb88HiH1xZuME64f20W" alt="Two-factor authentication verification code prompt"><figcaption></figcaption></figure>

If you lose access to the device and cannot obtain the code, you have several options:

1. Use a recovery code from the ones provided by Snyk API & Web during your 2FA account setup.
2. Reset your 2FA with the help of the Snyk API & Web account owner.
3. Contact the Snyk API & Web support team.

### Option 1: Use a recovery code

While setting up 2FA for your account, Snyk API & Web provides a set of recovery codes. If you have access to them:

1. Pick one code you never used before (each code can only be used once).
2. Type the code in the 2FA dialog to complete the authentication.

You are now logged in to Snyk API & Web. You can go to your profile and, in the **Two-factor authentication (2FA)** section, click **Update** to replace the device. The procedure is similar to steps four and five in the setup process.

### Option 2: Reset your 2FA

If you can reach out to the owner of your Snyk API & Web account, they can reset your 2FA and disable it for you.

The account owner must:

1. Open the **Settings** dropdown menu on the bottom-left corner of the navigation bar and click **Users**.

<figure><img src="/files/34XccfrgrLyIHH7qhjWY" alt="Settings menu with Users option"><figcaption></figcaption></figure>

2. On the Users screen, click the line of your user to edit it.
3. On the User edit screen, click **Reset 2FA** and confirm.

<figure><img src="/files/JBWFBgQH4Z2vjadFutE8" alt="Reset 2FA button in user edit screen"><figcaption></figcaption></figure>

Now, 2FA is disabled for your profile. You can log in without the second authentication step and set up 2FA again with a new device.

### Option 3: Contact support

If you cannot use a recovery code and the account owner is not available to reset your 2FA, contact the Snyk API & Web support team for assistance.

## Related information

* [Enforce 2FA for all users](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/managing-account/enforce-2fa-for-all-users.md)
* [Add users](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/managing-account/add-users.md)
* [Roles and permissions](/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/managing-account/roles-and-permissions.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/scan-fix-and-prevent/scan-with-snyk/snyk-api-web/managing-account/set-up-2fa.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
