C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Guardian.Factors;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Guardian.Factors.Phone.SetTemplatesAsync(
new SetGuardianFactorPhoneTemplatesRequestContent {
EnrollmentMessage = "enrollment_message",
VerificationMessage = "verification_message"
}
);
}
}package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
factors "github.com/auth0/go-auth0/management/management/guardian/factors"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &factors.SetGuardianFactorPhoneTemplatesRequestContent{
EnrollmentMessage: "enrollment_message",
VerificationMessage: "verification_message",
}
client.Guardian.Factors.Phone.SetTemplates(
context.TODO(),
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.guardian.factors.phone.requests.SetGuardianFactorPhoneTemplatesRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.guardian().factors().phone().setTemplates(
SetGuardianFactorPhoneTemplatesRequestContent
.builder()
.enrollmentMessage("enrollment_message")
.verificationMessage("verification_message")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Guardian\Factors\Phone\Requests\SetGuardianFactorPhoneTemplatesRequestContent;
$client = new Management(
token: '<token>',
);
$client->guardian->factors->phone->setTemplates(
new SetGuardianFactorPhoneTemplatesRequestContent([
'enrollmentMessage' => 'enrollment_message',
'verificationMessage' => 'verification_message',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.guardian.factors.phone.set_templates(
enrollment_message="enrollment_message",
verification_message="verification_message",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.guardian.factors.phone.set_templates(
enrollment_message: "enrollment_message",
verification_message: "verification_message"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.phone.setTemplates({
enrollmentMessage: "enrollment_message",
verificationMessage: "verification_message",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.phone.setTemplates({
enrollmentMessage: "enrollment_message",
verificationMessage: "verification_message",
});
}
main();curl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/phone/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_message": "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.",
"verification_message": "{{code}} is your verification code for {{tenant.friendly_name}}"
}
'{
"enrollment_message": "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.",
"verification_message": "{{code}} is your verification code for {{tenant.friendly_name}}"
}Update Enrollment and Verification Phone Templates
Customize the messages sent to complete phone enrollment and verification (subscription required).
PUT
https://{tenantDomain}/api/v2
/
guardian
/
factors
/
phone
/
templates
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Guardian.Factors;
public partial class Examples
{
public async Task Example() {
var client = new ManagementClient(
token: "<token>"
);
await client.Guardian.Factors.Phone.SetTemplatesAsync(
new SetGuardianFactorPhoneTemplatesRequestContent {
EnrollmentMessage = "enrollment_message",
VerificationMessage = "verification_message"
}
);
}
}package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
factors "github.com/auth0/go-auth0/management/management/guardian/factors"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
request := &factors.SetGuardianFactorPhoneTemplatesRequestContent{
EnrollmentMessage: "enrollment_message",
VerificationMessage: "verification_message",
}
client.Guardian.Factors.Phone.SetTemplates(
context.TODO(),
request,
)
}package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.resources.guardian.factors.phone.requests.SetGuardianFactorPhoneTemplatesRequestContent;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();
client.guardian().factors().phone().setTemplates(
SetGuardianFactorPhoneTemplatesRequestContent
.builder()
.enrollmentMessage("enrollment_message")
.verificationMessage("verification_message")
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Guardian\Factors\Phone\Requests\SetGuardianFactorPhoneTemplatesRequestContent;
$client = new Management(
token: '<token>',
);
$client->guardian->factors->phone->setTemplates(
new SetGuardianFactorPhoneTemplatesRequestContent([
'enrollmentMessage' => 'enrollment_message',
'verificationMessage' => 'verification_message',
]),
);from auth0.management import ManagementClient
client = ManagementClient(
token="<token>",
)
client.guardian.factors.phone.set_templates(
enrollment_message="enrollment_message",
verification_message="verification_message",
)require "auth0"
client = Auth0::Management.new(token: "<token>")
client.guardian.factors.phone.set_templates(
enrollment_message: "enrollment_message",
verification_message: "verification_message"
)import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.phone.setTemplates({
enrollmentMessage: "enrollment_message",
verificationMessage: "verification_message",
});
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.guardian.factors.phone.setTemplates({
enrollmentMessage: "enrollment_message",
verificationMessage: "verification_message",
});
}
main();curl --request PUT \
--url https://{tenantDomain}/api/v2/guardian/factors/phone/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_message": "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.",
"verification_message": "{{code}} is your verification code for {{tenant.friendly_name}}"
}
'{
"enrollment_message": "{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.",
"verification_message": "{{code}} is your verification code for {{tenant.friendly_name}}"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/jsonapplication/x-www-form-urlencoded
enrollment_message
string
default:{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.
required
Message sent to the user when they are invited to enroll with a phone number.
verification_message
string
default:{{code}} is your verification code for {{tenant.friendly_name}}
required
Message sent to the user when they are prompted to verify their account.
Response
Phone enrollment and verification templates successfully updated.
enrollment_message
string
default:{{code}} is your verification code for {{tenant.friendly_name}}. Please enter this code to verify your enrollment.
required
Message sent to the user when they are invited to enroll with a phone number.
verification_message
string
default:{{code}} is your verification code for {{tenant.friendly_name}}
required
Message sent to the user when they are prompted to verify their account.
⌘I