import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().updateMfaPolicy({ userId: "<string> (The ID of the User to update the MFA Policy for.)", mfaPolicyId: "<string> (Unique identifier for a given MFA Policy.)", mfaPolicyName: "<string> (Human-readable name for a Policy.)", condition: "<string> (A condition expression that evaluates to true or false, determining when this MFA policy applies.)", requiredAuthenticationMethods: ["<string>"] // An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA., order: 0 // The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first., notes: "<string> (Notes for an MFA Policy.)"});
import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().updateMfaPolicy({ userId: "<string> (The ID of the User to update the MFA Policy for.)", mfaPolicyId: "<string> (Unique identifier for a given MFA Policy.)", mfaPolicyName: "<string> (Human-readable name for a Policy.)", condition: "<string> (A condition expression that evaluates to true or false, determining when this MFA policy applies.)", requiredAuthenticationMethods: ["<string>"] // An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA., order: 0 // The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first., notes: "<string> (Notes for an MFA Policy.)"});
A list of authentication methods for this MFA step. If only one method is provided, it is required. If multiple are provided, the user must satisfy ANY one of them.
Show item details
A successful response returns the following fields:
import { Turnkey } from "@turnkey/sdk-server";const turnkeyClient = new Turnkey({ apiBaseUrl: "https://api.turnkey.com", apiPublicKey: process.env.API_PUBLIC_KEY!, apiPrivateKey: process.env.API_PRIVATE_KEY!, defaultOrganizationId: process.env.ORGANIZATION_ID!,});const response = await turnkeyClient.apiClient().updateMfaPolicy({ userId: "<string> (The ID of the User to update the MFA Policy for.)", mfaPolicyId: "<string> (Unique identifier for a given MFA Policy.)", mfaPolicyName: "<string> (Human-readable name for a Policy.)", condition: "<string> (A condition expression that evaluates to true or false, determining when this MFA policy applies.)", requiredAuthenticationMethods: ["<string>"] // An ordered list of authentication requirements. Each requirement must be satisfied sequentially to complete MFA., order: 0 // The order in which this MFA policy is evaluated, starting from 0, relative to other MFA policies. Lower order values are evaluated first., notes: "<string> (Notes for an MFA Policy.)"});