B2B Saas Authentication

/

Mobile SDKs

/

React Native SDK reference

/

Email Magic Links

/

Invite

Invite

The invite method wraps the invite Email Magic Link API endpoint. The organization_id will be automatically inferred from the logged-in Member's session.


Method parameters


email_address*string

invite_redirect_urlstring

invite_template_idstring

namestring

untrusted_metadataobject

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

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

  const inviteMember = () => {
    stytch.magicLinks.email.invite({
      email_address: 'sandbox@stytch.com',
    });
  };

  return (
    <View>
      <TouchableOpacity onPress={inviteMember}>
        <Text>Invite a Member</Text>
      </TouchableOpacity>
    </View>
  );
};

RESPONSE

200
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "member_id": "member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f",
    "member": {...},
    "organization": {...}
  }