Consumer Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Device Fingerprinting

/

Get telemetry ID

GetTelemetryId

import { Text, TouchableOpacity, View } from 'react-native';
import { useStytch } from '@stytch/react-native';

export const Authenticate = () => {
  const stytch = useStytch();

  const login = () => {
    stytch.dfp
      .getTelemetryID()
      .then((telemetry_id) => {
        // pass the telemetry_id to your backend to perform a lookup and handle the response as appropriate
        console.log({ telemetry_id });
      })
      .catch(console.error);
  };

  return (
    <View>
      <TouchableOpacity onPress={login}>
        <Text>Login</Text>
      </TouchableOpacity>
    </View>
  );
};

RESPONSE

026ac93b-8cdf-4fcb-bfa6-36a31cfecac1