Before you start
-
Configure a machine-to-machine (M2M) application, and grant it access to the Auth0 Management API with the following scopes:
create:authentication_methods
read:authentication_methods
update:authentication_methods
delete:authentication_methods
Get all authentication methods
Use the Gets a list of authentication methods endpoint to get a list of all of the authentication methods a user has either fully or partially enrolled. This endpoint requires the scope:read:authentication_methods
.
Examples
The following request returns a list of all authentication methods for a specified user.Responses
For each valid request, the will return a response in the JSON format.Get a single authentication method
Use the Gets an authentication method by ID endpoint to get a single authentication method for a user specified by the authentication method’s ID. This endpoint requires the scope:read:authentication_methods
.
Examples
The following request returns a single authentication method for a user based on the specified authentication method’s ID.Responses
For each valid request, the Management API will return a response in the JSON format.Create an authentication method
Use the Creates an authentication method for a given user endpoint to create an authentication method for a user, including SMS, email, one-time password (OTP), or WebAuthn with security keys. To learn more about available MFA authentication factors, read Multi-Factor Authentication Factors. This endpoint requires the scope:create:authentication_methods
.
Authentication methods created through this endpoint will be confirmed automatically and available immediately. Verify with the user that the authentication method is configured correctly and is still valid.
SMS
Send users an OTP over SMS which the user is then prompted to enter before they can finish authenticating.Examples
The following request creates a SMS authentication method for a user.Responses
For each valid request, the Management API will return a response in the JSON format.Examples
The following request creates an email authentication method for a user.Responses
For each valid request, the Management API will return a response in the JSON format.One-time passwords (OTP)
Enable users to use an authenticator application, such as Google Authenticator, on their personal device to generate an OTP that changes periodically, which the user is prompted to enter before they finish authenticating.Examples
The following request creates an OTP authentication method for a user.Responses
For each valid request, the Management API will return a response in the JSON format.WebAuthn with security keys
Enable users to use FIDO-compliant security keys (for example, Yubikey or Google Titan) to perform multi-factor authentication.Examples
The following request creates a WebAuthn with security keys authentication method for a user.Responses
For each valid request, the Management API will return a response in the JSON format.Replace all authentication methods
Use the Updates all authentication methods by replacing them with the given ones endpoint to replace all existing authentication methods with those provided. This endpoint requires the scope:update:authentication_methods
.
Examples
The following request replaces all existing authentication methods for a user.Responses
For each valid request, the Management API will return a response in the JSON format.Update a single authentication method
Use the Updates an authentication method endpoint to update a single authentication method for a user. This endpoint requires the scope:update:authentication_methods
.
Examples
The following request updates a single authentication method for a user based on the specific authentication method’s ID.Responses
For each valid request, the Management API will return a response in the JSON format.Delete all authentication methods
Use the Deletes all authentication methods for the given user endpoint to delete all authentication methods for a user. This endpoint requires the scope:delete:authentication_methods
.
Examples
The following request deletes all authentication methods for a user.Responses
For each valid request, the Management API will return a response with a204
status code and empty body.
Delete a single authentication method
Use the Deletes an authentication method by ID endpoint to delete a single authentication method for a user.Examples
The following request deletes a single authentication method for a user based on the specified authentication method’s ID.Responses
For each valid request, the Management API will return a response with a204
status code and empty body.