WPX

Return single-use WordPress login URL

Changed on

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.
get/WPX/get_credentials

Request

  • Base URL
    https://cpanel-server.tld:2083/execute
  • Auth
    HTTP basic

Query parameters

idinteger required

The WordPress Toolkit installation id, as returned in the wptk_id field of list_websites.

panel_return_urlstring uri

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.

Response

The HTTP request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "get_credentials",
  "module": "WPX",
  "result": {
    "data": {
      "login_url": "https://blog.example.com/wp-login.php?token=EXAMPLETOKEN"
    },
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}

Changes