TwoFactorAuth
5 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="TwoFactorAuth", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.generate_user_configuration GET#
Create 2FA authentication code
This function generates an authentication code to enable configuration of two-factor authentication.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
get_team_user_configuration GET#
Return team user 2FA config
This function retrieves a team user's configuration settings for two-factor authentication.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
get_user_configuration GET#
Return cPanel account 2FA config
This function retrieves the cPanel account user's configuration settings for two-factor authentication.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
remove_user_configuration GET#
Remove 2FA config
This function removes the user from the two-factor authentication userdata file.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
set_user_configuration GET#
Save 2FA config
This function configures the two-factor authentication settings for an account.
Response — normalized as { ok, data, errors[], warnings[] }; data contains: