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

# code またはリンクを取得

> ユーザーのメールアドレスまたは電話番号にワンタイムコードまたはマジックリンクを送信して、パスワードレス認証を開始します。

<div id="endpoint">
  ## エンドポイント
</div>

`POST /passwordless/start`

パスワードレス接続では、ユーザーがパスワードを覚えておく必要はありません。代わりに、ユーザーがログインするたびに、メールまたは SMS で送信されるワンタイムコード など、別の方法で本人確認を行います。

[パスワードレス認証](https://auth0.com/docs/authenticate/passwordless)には、次の 3 つの方法があります。

* メールで確認 code を送信する。
* メールでリンクを送信する。
* SMS で確認 code を送信する。

<div id="remarks">
  ### 備考
</div>

* メールアドレスまたは SMS で確認 code を送信した場合は、code を受け取った後、`email` または `phone_number` を `username` として、確認 code を `password` として使用し、[/passwordless/verify エンドポイント](/ja/passwordless/authenticate-user) を使ってユーザーを認証する必要があります。
* このエンドポイントはクライアント側から呼び出すことを想定して設計されており、\[レート制限][https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy](https://auth0.com/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy)) の対象です。
* auth0.js スクリプトのサンプルでは、ライブラリのバージョン 8 を使用しています。auth0.js バージョン 7 を使用している場合は、この[リファレンスガイド](/ja/libraries/auth0js/v7)を参照してください。

<div id="error-codes">
  ### エラーコード
</div>

このエンドポイントの完全なエラーコードの一覧については、[Errors > POST /passwordless/start](#post-passwordless-start)を参照してください。

<div id="learn-more">
  ### 詳しくはこちら
</div>

* [パスワードレス認証](https://auth0.com/docs/authenticate/passwordless)
* [パスワードレスのベストプラクティス](https://auth0.com/docs/authenticate/passwordless/best-practices)

<div id="body-parameters">
  ## Body パラメーター
</div>

<ParamField body="client_id" type="string" required>
  アプリケーションの `client_id` です。
</ParamField>

<ParamField body="client_assertion" type="string">
  アプリケーションの認証情報を含む、署名付きアサーションの JWT です。アプリケーションの認証方式が Private Key JWT の場合に必須です。
</ParamField>

<ParamField body="client_assertion_type" type="string">
  値 `urn:ietf:params:oauth:client-assertion-type:jwt-bearer` を使用します。アプリケーションの認証方式が Private Key JWT の場合に必須です。
</ParamField>

<ParamField body="client_secret" type="string">
  アプリケーションの `client_secret` です。Regular Web Applications で**のみ**必須です。
</ParamField>

<ParamField body="connection" type="string" required>
  ユーザーに確認 code またはリンクを送信する方法です。メールで送信するには `email`、SMS で送信するには `sms` を使用します。

  使用可能な値: `email`, `sms`
</ParamField>

<ParamField body="email" type="string">
  `connection=email` の場合は、ユーザーのメールアドレスを設定します。
</ParamField>

<ParamField body="phone_number" type="string">
  `connection=sms` の場合は、ユーザーの電話番号を設定します。
</ParamField>

<ParamField body="send" type="string">
  リンクを送信するには `link`、確認 code を送信するには `code` を使用します。null の場合はリンクが送信されます。

  使用可能な値: `link`, `code`
</ParamField>

<ParamField body="authParams" type="object">
  `scope`、`state`、`redirect_uri` など、追加する認証パラメーターを指定します。

  <Expandable title="properties">
    <ParamField body="scope" type="string">
      OAuth スコープ。
    </ParamField>

    <ParamField body="state" type="string">
      リクエストとコールバックの間で状態を維持するための state パラメーターです。
    </ParamField>
  </Expandable>
</ParamField>

<div id="response-messages">
  ## レスポンスメッセージ
</div>

| Status | Description                |
| ------ | -------------------------- |
| 200    | code またはリンクが正常に送信されました。    |
| 400    | 不正なリクエストです。パラメーターが無効です。    |
| 401    | 認証されていません。クライアント認証情報が無効です。 |
