Skip to content

Get a WordPress admin login link

POST /api/v2/shared-hosting/{accountId}/wordpress/{siteId}/actions/sso

Creates a login link to the WordPress admin of one site. Use it to sign in without the admin password. The link works once. expiresAt is null because the link has no fixed expiry time. Treat loginUrl like a password and do not store it.

The link only opens through the site’s own address. When that address leads to another server, shows the Hostup parking page or has no DNS record, the call returns 409 wordpress_site_not_served_here. Point the domain at this hosting first. To get the link anyway, send { "allowExternalDns": true }.

The web hosting account must be active and on cPanel.

Authentication: An API key with the scopes write:hosting and console:services. About keys and scopes

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).
siteIdstringrequired
The WordPress site ID (wp_…).

Body (optional)

allowExternalDnsboolean
Set true to get the link even when the site’s address does not lead to this hosting. Default false.

Example

POST /api/v2/shared-hosting/{accountId}/wordpress/{siteId}/actions/sso
curl -X POST "https://cloud.hostup.se/api/v2/shared-hosting/acct_01hxa3b4c5d6e7f8g9h0j1k2m3/wordpress/wp_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/sso" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json"

Responses

200 The login link.

Response 200
{
"loginUrl": "https://example.com/wp-admin/?hostup_sso=YOUR_TOKEN",
"id": "wp_01hxa3b4c5d6e7f8g9h0j1k2m3",
"expiresAt": null,
"singleUse": true
}
Response fields
loginUrlstring
One-time login URL for the WordPress admin.
idstring
The WordPress site ID (wp_…).
expiresAtstring or null
Always null. The link has no fixed expiry time.
singleUseboolean
Always true. The link works once.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is wp_installation_not_found.
409The link cannot be created. code is wordpress_site_not_served_here when the site’s address does not lead to this hosting (site.reason is elsewhere, parking or unresolvable; send allowExternalDns: true to get the link anyway), account_suspended when the account is suspended, or account_not_eligible_cpanel when the account is not on cPanel.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.
502Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists.