# Return WordPress administrator account

This function returns the WordPress administrator account details for an
installation that the caller owns: the administrator logins, the first
administrator's display name and email address, and the login URL. The
WordPress administration settings form uses it to fill in current values.

  Note:

  - The stored WordPress password is never returned. Use
    change_admin_password to set a new one, and get_credentials to sign
    in without a password.
  - The system verifies that the caller owns the installation before it
    reads anything.
  - When the installation has no WordPress administrator, the
    current_user_id field is null, the other text fields are empty
    strings, and the available_logins field is an empty array. A failure
    to read the administrator list is different: it returns a failure
    status with a message in the errors field.
  - The active WordPress language is not part of this response. Use
    set_language to change it.

Endpoint: GET /WPX/get_admin_account
Version: 11.138.0.19
Security: BasicAuth

## Query parameters:

  - `id` (integer, required)
    The WordPress Toolkit installation id, as returned in the wptk_id field of list_websites.
    Example: 17

## Response 200 fields (application/json):

  - `apiversion` (integer)
    The version of the API.
    Example: 3

  - `func` (string)
    The name of the method called.
    Example: "get_admin_account"

  - `module` (string)
    The name of the module called.
    Example: "WPX"

  - `result` (object)

  - `result.data` (object)
    The administrator account details for the installation.

  - `result.data.available_logins` (array)
    Every WordPress administrator login on the installation. This is an empty array when the installation has no administrator.
    Example: ["admin_abcd"]

  - `result.data.current_display_name` (string)
    The first administrator's WordPress display name, or an empty string.
    Example: "Admin"

  - `result.data.current_email` (string)
    The first administrator's WordPress email address, or an empty string.
    Example: "admin@example.tld"

  - `result.data.current_login` (string)
    The first administrator's WordPress login, or an empty string.
    Example: "admin_abcd"

  - `result.data.current_user_id` (integer,null)
    The first administrator's WordPress user id, or null when the installation has no administrator.
    Example: 1

  - `result.data.login_url` (string)
    The WordPress administrator login URL. This is informational, and it carries no token. It is an empty string when the system could not determine the site URL.
    Example: "https://blog.example.com/wp-login.php"

  - `result.errors` (array,null)
    List of errors if the API failed.

  - `result.messages` (array,null)
    List of messages generated by the API.

  - `result.metadata` (object)

  - `result.metadata.transformed` (integer)
    Post-processing may have transformed the data.
    Enum: 1

  - `result.status` (integer)
    - 1 - Success.
- 0 - Failed: Check the errors field for more details.
    Enum: 1, 0

  - `result.warnings` (array,null)
    List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running an API.


