---
title: "Get the secret key for the authenticated user's 2FA enrolment"
method: GET
path: "/user/two-factor-secret-key"
tags: ["Users"]
---

# Get the secret key for the authenticated user's 2FA enrolment

`GET /user/two-factor-secret-key`

Returns the base32-encoded shared secret for the user's 2FA
enrolment. Use this if the user is configuring their
authenticator app by typing the secret in by hand rather than
scanning the QR code returned by
`getCurrentUserTwoFactorQrCode`.

## Response `200`

The secret key was successfully retrieved.

- TwoFactorSecretKey — The two-factor authentication shared secret in base32 form. Use this if the user is configuring their authenticator by hand instead of scanning the QR code.
  - `secretKey` string, required — The base32-encoded shared secret.

## Other responses

- `401` — The user is unauthenticated
- `404` — The resource couldn't be found

---

[API](https://skmtc.dev/try/apis/trybe-api.md) · [All operations](https://skmtc.dev/try/apis/trybe-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/try/trybe-api/revisions/f37f92702da5/schema)
