Passer au contenu principal
PUT
/
guardian
/
factors
/
{name}
TypeScript
import { ManagementClient } from "auth0";

async function main() {
    const client = new ManagementClient({
        token: "<token>",
    });
    await client.guardian.factors.set("push-notification", {
        enabled: true,
    });
}
main();
{
  "enabled": true
}

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Paramètres de chemin

name
enum<string>
défaut:sms
requis

Factor name. Can be sms, push-notification, email, duo otp webauthn-roaming, webauthn-platform, or recovery-code.

Options disponibles:
push-notification,
sms,
email,
duo,
otp,
webauthn-roaming,
webauthn-platform,
recovery-code
Minimum string length: 1

Corps

enabled
boolean
requis

Whether this factor is enabled (true) or disabled (false).

Réponse

Factor updated successfully.

enabled
boolean
requis

Whether this factor is enabled (true) or disabled (false).