> ## 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 Sensor

> Check if biometric sensors are available on the device using the Stytch React Native SDK

Call this method to check if biometric sensors are available on the device. This method can be used to determine whether or not to show biometric registration options.

## Parameters

<ParamField body="allowDeviceCredentials" type="boolean">
  Allows user to enter their device credentials (e.g. PIN code) as a fallback for failed biometric authentication. If this is set to false on registration, authentication will not be allowed to enable fallback to device credentials.
</ParamField>

## Response

<ResponseField name="available" type="boolean">
  Whether biometric sensors are available on the device.
</ResponseField>

<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 React, { useEffect, useState } from 'react';
    import { Text, View } from 'react-native';
    import { useStytch } from '@stytch/react-native';

    export const CheckSensor = () => {
      const stytch = useStytch();
      const [sensorAvailable, setSensorAvailable] = useState(false);

      useEffect(() => {
        const checkSensor = async () => {
          if (stytch) {
            try {
              const available = await stytch.biometrics.getSensor({
                allowDeviceCredentials: true,
              });
              setSensorAvailable(available);
            } catch {
              setSensorAvailable(false);
            }
          }
        };

        checkSensor();
      }, [stytch]);

      return (
        <View>
          <Text>
            {sensorAvailable
              ? 'Biometric sensor is available'
              : 'Biometric sensor is not available'}
          </Text>
        </View>
      );
    };
    ```
  </RequestExample>
</Panel>
