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

# Get Recovery Codes

> Get backup recovery codes using the Stytch Next.js SDK

export const member = "Represents an individual end user's account within a given Organization, uniquely identified within that Organization by their email address.";

`recoveryCodes.get` wraps the [Get Recovery Codes](/docs/api-reference/b2b/api/mfa/recovery-codes/get-recovery-codes) API endpoint. Both the `organization_id` and `member_id` for this request will be inferred from the current <Tooltip tip={member}>Member's</Tooltip> session.

## Response

<ParamField path="recovery_codes" type="string[]">
  The recovery codes used to authenticate the member without an authenticator app.
</ParamField>

<ResponseField name="request_id" type="string">
  Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
  may ask for this value to help identify a specific API call when helping you debug an issue.
</ResponseField>

<ResponseField name="status_code" type="number">
  The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
  equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
</ResponseField>

<Panel>
  <RequestExample>
    ```jsx theme={null}
    import { useEffect, useState } from 'react';
    import { useStytchB2BClient } from '@stytch/nextjs/b2b';

    export const GetRecoveryCodes = () => {
      const stytch = useStytchB2BClient();
      const [codes, setCodes] = useState([]);

      const fetchRecoveryCodes = async () => {
        const response = await stytch.mfa.recoveryCodes.get({
          organization_id: 'organization-test-07971b06-ac8b-4cdb-9c15-63b17e653931',
          member_id: 'member-test-32fc5024-9c09-4da3-bd2e-c9698807585d',
        });
        setCodes(response.recovery_codes);
      };

      useEffect(() => {
        fetchRecoveryCodes();
      }, []);

      return (
        <div>
          <h3>Recovery Codes</h3>
          {codes.map((code, index) => (
            <p key={index}>{code}</p>
          ))}
        </div>
      );
    };
    ```
  </RequestExample>
</Panel>
