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

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

> 登録と検証中にAuth0から送られたSMSと音声メッセ―ジのカスタマイズ方法について説明します。

登録（Guardianにデバイスを関連付ける場合）や検証（デバイスに認証メッセージが送られた場合）中にAuth0から送られたSMSや音声メッセージをカスタマイズすることができます。

1. [［Dashboard］>［Security（セキュリティ）］>［Multi-factor Auth（多要素認証）］](https://manage.auth0.com/#/security/mfa)に移動し、 **［Phone Message（電話メッセ―ジ）］** をクリックします。
2. メッセージのテンプレートをカスタマイズし、 **［Save（保存）］** をクリックします。

2つのメッセージタイプにテンプレートをカスタマイズできます。

* **［Enrollment（登録）］** ：デバイスエンロールメント中にAuth0から送られたメッセージ。
* **［Verification（検証）］** ：デバイスの所有を検証するためにAuth0から送られたメッセージ。

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

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

<table class="table">
  <thead>
    <tr>
      <th>属性</th>
      <th>説明</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`message_type`</td>
      <td>どの種類のメッセージが送信されるかを示します（`sms`または`voice`）。</td>
    </tr>

    <tr>
      <td>`code`</td>
      <td>登録/検証コード。音声メッセージを送信する場合。変数の値は数字の間にドットを入れて区切ります（`1.2.3.4.5`）。これで、音声メッセージングプロバイダーによって正確に発音されます。</td>
    </tr>

    <tr>
      <td>`locale`</td>
      <td>ユニバーサルログインまたはMFA API用。言語を指定します。</td>
    </tr>

    <tr>
      <td>`requestInfo.lang`</td>
      <td>クラシックログインのローカリゼーション用。ブラウザーからのAccept-Languageヘッダー。例：`es-AR,es;q=8.0`、`en-US,en`</td>
    </tr>

    <tr>
      <td>`tenant.friendlyName`</td>
      <td><b>［Dashboard］>［Tenant Settings（テナント設定）］<b>で設定された</b>フレンドリー名前</b>。</td>
    </tr>
  </tbody>
</table>

<div id="example">
  ## 例
</div>

```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>

エンドポイントは、`x-request-language`ヘッダーをサポートし、それをロケールに送ることができます。詳細については、「[多言語サポート](/docs/ja-JP/ja-jp/connections/passwordless/guides/sms-otp#multi-language-support)」を参照してください。

<Tooltip data-tooltip-id="react-containers-DefinitionTooltip-0" href="/docs/ja-JP/ja-jp/glossary?term=multifactor-authentication" tip="多要素認証（MFA）: ユーザー名とパスワードに加えて、SMS経由のコードなどの要素を使用するユーザー認証プロセス。" cta="用語集の表示">MFA</Tooltip> API（`POST /mfa/associate`と`POST /mfa/challenge`エンドポイント）でもサポートされています。送られたら、そのロケールはMFA SMS/音声テンプレートの`locale`変数で利用可能です。

これらを機能させるためには、 **［Tenant（テナント）］>［Settings（設定）］** （ **［Supported Languages（サポートされる言語）］** の下）から対象言語を選択する必要があります。

<div id="learn-more">
  ## もっと詳しく
</div>

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