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
accountIdstringrequiredacct_…).siteIdstringrequiredwp_…).Body (optional)
allowExternalDnsbooleantrue to get the link even when the site’s address does not lead to this hosting. Default false.Example
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"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" \ -d '{ "allowExternalDns": true }'Responses
200 The login link.
{ "loginUrl": "https://example.com/wp-admin/?hostup_sso=YOUR_TOKEN", "id": "wp_01hxa3b4c5d6e7f8g9h0j1k2m3", "expiresAt": null, "singleUse": true}Response fields
loginUrlstringidstringwp_…).expiresAtstring or nullnull. The link has no fixed expiry time.singleUsebooleantrue. The link works once.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is wp_installation_not_found. |
| 409 | The 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. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 502 | Upstream failure. A dependent provider request failed; the Problem Details code is upstream_failed. Retry later or contact support if the issue persists. |