> ## 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.

# 多要素認証のSMSおよび音声メッセージをカスタマイズする

> 登録時と検証時にAuth0から送信されるSMSメッセージと音声メッセージをカスタマイズする方法を説明します。

Auth0から送信される多要素認証のSMSメッセージと音声メッセージをカスタマイズするには、次の手順に従います。

1. [Auth0 Dashboard > Security > Multi-factor Auth](https://manage.auth0.com/#/security/mfa) に移動し、**Phone Message** をクリックします。
2. **Enrollment Template** または **Verification Template** セクションで、メッセージをカスタマイズします。
3. **Save** をクリックします。

**Enrollment Template** では、ユーザーが初めてMFAを使用して新しいデバイスを登録する際に送信されるメッセージを定義します。**Verification Template** では、ユーザーが登録後にログインする際に送信されるメッセージを定義します。

<div id="syntax">
  ## 構文
</div>

[Liquid](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers) 構文は、SMS テンプレートでユーザー属性にアクセスする際に使用できる、サポートされているテンプレートエンジンです。使用できる属性は次のとおりです。

| Attribute                       | Description                                                                             |
| ------------------------------- | --------------------------------------------------------------------------------------- |
| `message_type`                  | 送信されるメッセージの種類を示します。`sms` または `voice` です。                                                |
| `code`                          | 登録/確認コード。音声メッセージを送信する場合は、音声メッセージプロバイダーが正確に読み上げられるよう、変数の値は各桁の間をドットで区切ります (`1.2.3.4.5`) 。 |
| `locale`                        | Universal Login または MFA API で使用します。言語を指定します。                                            |
| `requestInfo.lang`              | クラシックログインのローカライズで使用します。ブラウザーの accept-language ヘッダーです。例: `es-AR,es;q=8.0`, `en-US,en`。   |
| `tenant.friendlyName`           | **Auth0 Dashboard > Tenant Settings** で設定した **Friendly Name**。                          |
| `custom_domain.domain`          | テナントのドメイン名。                                                                             |
| `custom_domain.domain_metadata` | カスタムドメインのメタデータフィールド (キーと値のペア) 。                                                         |

以下は、Liquid 構文を使用して、言語に応じて voice と SMS で異なるメッセージを送信する例です。

```liquid lines theme={null}
{% if message_type == "voice" %}
    {% if locale contains "fr" %}
        Bonjour, vous avez demandé à recevoir un code de vérification pour vous enregister avec {{tenant.friendly_name}}. Votre code est: {{pause}} {{code}}. Je répète, votre code est: {{pause}}{{code}}.
    {% elsif locale contains "es" %}
        Usted ha requerido un código de verificación para inscribirse con {{tenant.friendly_name}}. Su código es: {{pause}}{{code}}. Repito, su código es: {{pause}}{{code}}.
    {% else %}
        Hello, you requested a verification code to enroll with {{tenant.friendly_name}}. Your code is: {{pause}}{{code}}. I repeat, your code is: {{pause}}{{code}}.
    {% endif %}
{% else %}
    {% if locale contains "fr" %}
        {{code}} est votre code de vérification pour vous enregistrer avec {{tenant.friendly_name}}.
    {% elsif locale contains "es" %}
        {{code}} es su código para inscribirse con {{tenant.friendly_name}}.
    {% else %}
        {{code}} is your verification code to enroll with {{tenant.friendly_name}}.
    {% endif %}
{% endif %}
```

<div id="localization">
  ## ローカライズ
</div>

Auth0 Authentication API では、[Get Code or Link endpoint](https://auth0.com/docs/api/authentication/passwordless/get-code-or-link)、MFA の [Challenge request endpoint](https://auth0.com/docs/api/authentication/muti-factor-authentication/request-mfa-challenge)、および MFA の [Add an 認証器 endpoint](https://auth0.com/docs/api/authentication/muti-factor-authentication/add-an-authenticator) で `x-request-language` ヘッダーがサポートされています。

これを使用するには、**テナント > 設定** (**Supported Languages** の下) でサポートする言語を設定します。`x-request-lanuage` ヘッダーが送信されると、そのロケールを MFA の Phone Message テンプレート内の `locale` 変数で利用できるようになります。詳しくは [パスワードレス多言語サポート](/docs/ja-jp/authenticate/passwordless/authentication-methods/sms-otp#multi-language-support) を参照してください。

<div id="learn-more">
  ## 詳細情報
</div>

* [多要素認証 (MFA) ](/docs/ja-jp/secure/multi-factor-authentication)
* [MFA の SMS 通知と音声通知を設定する](/docs/ja-jp/secure/multi-factor-authentication/multi-factor-authentication-factors/configure-sms-voice-notifications-mfa)
* [SMS および音声の認証器の登録とチャレンジ](/docs/ja-jp/secure/multi-factor-authentication/authenticate-using-ropg-flow-with-mfa/enroll-challenge-sms-voice-authenticators)
