# Return single-use WordPress login URL

This function returns a single-use login URL for a WordPress installation
that the caller owns. The URL carries a one-time token, so the caller does
not need the WordPress administrator password.

  Note:

  - Each call mints a new token, so the function is not idempotent and two
    calls return two different URLs. A token is consumed the first time it
    is used.
  - The login and password fields are always empty. They exist so the
    response shape stays stable for callers that expect a credential pair.
    This function never returns a WordPress password.
  - The system verifies that the caller owns the installation before it
    mints a token.

Endpoint: GET /WPX/get_credentials
Version: 11.138.0.10
Security: BasicAuth

## Query parameters:

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

  - `panel_return_url` (string)
    A cPanel URL to return the user to from the WordPress administration
area. When the value passes validation, the system appends it to the login
URL and the WordPress administration sidebar shows a link back to cPanel.
The value is validated, and an unacceptable value is ignored rather
than rejected. It must use the https scheme, must be 2048 characters
or fewer, must not contain a userinfo (@) component, and its host
must match the cPanel host that serves the request.
    Example: "https://cpanel-server.tld:2083/frontend/jupiter/index.html"

## Response 200 fields (application/json):

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

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

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

  - `result` (object)

  - `result.data` (object)
    The single-use login URL, with two always-empty credential fields.

  - `result.data.login` (string)
    Always an empty string. The login is token-based, so no user name is returned.

  - `result.data.login_url` (string)
    The single-use WordPress login URL. This is an empty string when the backend returned no link.
    Example: "https://blog.example.com/wp-login.php?token=EXAMPLETOKEN"

  - `result.data.password` (string)
    Always an empty string. This function never returns a WordPress password.

  - `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.


