> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelence.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sendMagicLink

[API Reference](/api-reference/modelence/client/functions/../../../index) / [modelence](/api-reference/modelence/client/functions/../../index) / [client](/api-reference/modelence/client/functions/../index) / sendMagicLink

> **sendMagicLink**(`options`): `Promise`\<`void`>

Defined in: [packages/modelence/src/auth/client/index.ts:186](https://github.com/modelence/modelence/blob/0db3afaa9e9d0dc8b5bc30d984757f5ba9684f92/packages/modelence/src/auth/client/index.ts#L186)

Send a magic sign-in link to the given email address.

Clicking the emailed link signs the user in. When the server enables
`auth.magicLink.allowSignup`, this also works for new users — the account is
created when the link is used; otherwise unknown emails receive no email.
A generic response is always returned to avoid leaking account information.

## Example

```ts theme={null}
await sendMagicLink({ email: 'user@example.com' });
```

## Parameters

| Parameter       | Type                    | Description                                  |
| --------------- | ----------------------- | -------------------------------------------- |
| `options`       | \{ `email`: `string`; } | -                                            |
| `options.email` | `string`                | The email address to send the magic link to. |

## Returns

`Promise`\<`void`>
