B2B Saas Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Email Magic Links

/

Send Discovery Email

Send discovery email


Method parameters


email_address*string

discovery_redirect_urlstring

login_template_idstring

localestring

Response fields


request_idstring

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

export const Login = () => {
  const stytch = useStytchB2BClient();

  const sendDiscoveryEmail = () => {
    stytch.magicLinks.email.discovery.send({
      email_address: 'sandbox@stytch.com',
    });
  };

  return (
    <View>
      <TouchableOpacity onPress={sendDiscoveryEmail}>
        <Text>Send email</Text>
      </TouchableOpacity>
    </View>
  );
};

RESPONSE

200
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141"
}