- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function returns a list of user-controlled accounts and whether the accounts have Two-Factor Authentication (2FA) enabled.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/twofactorauth_get_user_configs?api.version=1&user=example
https://hostname.example.com:2087/cpsess##########/xml-api/twofactorauth_get_user_configs?api.version=1&user=example
whmapi1 twofactorauth_get_user_configs user=example
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data":{ "example":{ "is_enabled":0, "primary_domain":"example.tld" } }, "metadata":{ "version":1, "reason":"OK", "result":"1", "command":"twofactorauth_get_user_configs" } }
<result> <data> <example> <is_enabled>0</is_enabled> <primary_domain>example.tld</primary_domain> </example> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>twofactorauth_get_user_configs</command> </metadata> </result>
Note:
Parameters
Parameter | Type | Description | Possible values | Example |
---|---|---|---|---|
user | string | The username for a specified account. If you do not specify a value, the function returns all user accounts. | A valid string. | example |
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
| hash | A hash of the account's data. Note: The account's name is the return name. | This hash includes the | |
| Boolean | Whether the account has 2FA enabled. The function returns this value in the |
| 1 |
| string | The account's primary domain. The function returns this value in the | A valid string. | example.tld |
Function information
API Version:
Available in:
WHM 54+
Methods:
GET, POST
Required Parameters:
(none)
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Sections - Authentication — Authentication functions allow you to manage how users log in to a cPanel & WHM server.
-
Page:WHM API 1 Functions - twofactorauth_disable_policy — This function disables the Two-Factor Authentication (2FA) security policy on the server.
-
Page:WHM API 1 Functions - twofactorauth_enable_policy — This function enables the Two-Factor Authentication (2FA) security policy on the server.
-
Page:WHM API 1 Functions - twofactorauth_generate_tfa_config — This function generates a random secret and a one-time password authentication (OTP auth) URL for the user.
-
Page:WHM API 1 Functions - twofactorauth_get_issuer — This function returns the currently configured issuer.