---
title: "request passwordless login code · RUAL Documentation"
description: "Send a passwordless login code (email or SMS) to a user. Bypasses the rate limit so it can be triggered right after creating an account. The code itself…"
canonical: https://docs.rual.nl/block-types/users/function_user_request_passwordless_code
language: en
---

# request passwordless login code

This block is part of the [`users`](https://docs.rual.nl/block-types/users) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Send a passwordless login code (email or SMS) to a user. Bypasses the rate limit so it can be triggered right after creating an account. The code itself is never exposed.

- flow `flow`

- Identifier required `value` Email address or phone number to send the code to.

- Identifier type `value` Either "email" or "phone". Defaults to "email".

Default `email`

- IP `value` Client IP recorded in the "Login attempt details" section of the email. Defaults to the IP of the API client that triggered the blueprint.

- flow `flow`

- Success `condition` True when the code was actually sent. False when the identifier did not match an eligible user or delivery failed.

- Error `value` Error message when success is false.

| `passwordless` |
| --- |
| `login` |
| `magic` |
| `code` |

A [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) runs the endpoint: the request body is read with [get body](https://docs.rual.nl/block-types/http%20connection/httpconnection_get_body), [get fields](https://docs.rual.nl/block-types/object/object_field_getter_multiple) takes the email off it, and [request passwordless login code](https://docs.rual.nl/block-types/users/function_user_request_passwordless_code) mails the code. A [branch](https://docs.rual.nl/block-types/flow/branch) on the success pin decides between a 200 reply and a 400, both sent with [reply in JSON](https://docs.rual.nl/block-types/json/httpconnection_set_json).

![Studio canvas example for the request passwordless login code block: the request-code half of passwordless login.](https://docs.rual.nl/canvas-examples/function_user_request_passwordless_code.png)

### Commonly used with

In production blueprints, this block is most often wired together with:

- [branch](https://docs.rual.nl/block-types/flow/branch): wired in both directions with this block.

- [get fields](https://docs.rual.nl/block-types/object/object_field_getter_multiple): feeds into this block. Gets the selected fields from the given object.

- [value](https://docs.rual.nl/block-types/value/value_default): feeds into this block. Simply returns the provided value.

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
