# get\_\_mfa\_status

`GET /mfa/status`

*Get MFA Status*

Retrieve the current multi-factor authentication status for the authenticated user, including enabled methods and enforcement settings.

#### TypeScript Client Library

```typescript
// Note: This endpoint doesn't have a direct client method in the provided TypeScript client
// You would need to use the generic makeRequest method:
// this.makeRequest<any>('mfa/status', 'GET', null);
```

#### Code Samples

{% tabs %}
{% tab title="Shell" %}

```shell
# You can also use wget
curl -X GET https://backend.flashback.tech/mfa/status \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'
```

{% endtab %}

{% tab title="HTTP" %}

```http
GET https://backend.flashback.tech/mfa/status HTTP/1.1
Host: localhost:3000
Accept: application/json
Authorization: Bearer {access-token}
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('https://backend.flashback.tech/mfa/status',
{
  method: 'GET',
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get 'https://backend.flashback.tech/mfa/status',
  params: {
  }, headers: headers

p JSON.parse(result)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://backend.flashback.tech/mfa/status', headers = headers)

print(r.json())
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

try {
    $response = $client->request('GET','https://backend.flashback.tech/mfa/status', array(
        'headers' => $headers,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...
```

{% endtab %}

{% tab title="Java" %}

```java
URL obj = new URL("https://backend.flashback.tech/mfa/status");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Accept", "application/json");
con.setRequestProperty("Authorization", "Bearer {access-token}");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());
```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{})
    req, err := http.NewRequest("GET", "https://backend.flashback.tech/mfa/status", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}
```

{% endtab %}
{% endtabs %}

> Example responses

> 200 Response

```json
{
  "success": true,
  "data": {
    "isEnabled": true,
    "isRequired": false,
    "isEnforced": false,
    "enabledMethods": ["GOOGLE_AUTH", "PASSKEY"],
    "primaryMethod": "GOOGLE_AUTH"
  }
}
```

> 500 Response

```json
{
  "success": false,
  "error": "Failed to get MFA status"
}
```

#### Responses <a href="#get__mfa_status-responses" id="get__mfa_status-responses"></a>

| Status | Meaning                                                                    | Description                       | Schema |
| ------ | -------------------------------------------------------------------------- | --------------------------------- | ------ |
| 200    | [OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)                    | MFA status retrieved successfully | Inline |
| 500    | [Internal Server Error](https://tools.ietf.org/html/rfc7231#section-6.6.1) | Internal server error             | Inline |

#### Response Schema <a href="#get__mfa_status-responseschema" id="get__mfa_status-responseschema"></a>

Status Code **200**

| Name              | Type      | Required | Restrictions | Description                             |
| ----------------- | --------- | -------- | ------------ | --------------------------------------- |
| » success         | boolean   | false    | none         | Indicates if the request was successful |
| » data            | object    | false    | none         | MFA status information                  |
| »» isEnabled      | boolean   | false    | none         | Whether MFA is enabled for the user     |
| »» isRequired     | boolean   | false    | none         | Whether MFA is required for the user    |
| »» isEnforced     | boolean   | false    | none         | Whether MFA is enforced by organization |
| »» enabledMethods | \[string] | false    | none         | Array of enabled MFA method types       |
| »» primaryMethod  | string    | false    | none         | The user's primary MFA method           |

Status Code **500**

| Name      | Type    | Required | Restrictions | Description                             |
| --------- | ------- | -------- | ------------ | --------------------------------------- |
| » success | boolean | false    | none         | Indicates if the request was successful |
| » error   | string  | false    | none         | Error message describing the issue      |

**Enumerated Values**

| Parameter        | Value        | Description                     |
| ---------------- | ------------ | ------------------------------- |
| » enabledMethods | GOOGLE\_AUTH | Google Authenticator TOTP       |
| » enabledMethods | MAGIC\_LINK  | Magic link email verification   |
| » enabledMethods | PASSKEY      | WebAuthn passkey authentication |
| » primaryMethod  | GOOGLE\_AUTH | Google Authenticator TOTP       |
| » primaryMethod  | MAGIC\_LINK  | Magic link email verification   |
| » primaryMethod  | PASSKEY      | WebAuthn passkey authentication |


---

# Agent Instructions: 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:

```
GET https://docs.flashback.tech/support-reference/platform-api-reference/mfa-multi-factor-authentication/get__mfa_status.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
