The Send Discovery Email method wraps the send discovery email API endpoint.
Send discovery email
Method parameters
email_address* string
discovery_redirect_url string
login_template_id string
locale string
Response fields
request_id string
status_code int
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"
}