Skip to content

Create a control panel login link

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

Create a one-time link that logs in to the control panel of a web hosting account without a password. Open it in a browser right away. Do not store it. The link is valid for a short time. Its exact lifetime is not known. expiresAt is therefore null. The account must be active. Check available on GET /api/v2/shared-hosting/{accountId}/actions/sso first. An inactive account answers 409 service_not_active.

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

Request

Path parameters

accountIdstringrequired
The web hosting account ID (acct_…).

Example

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

Responses

200 The login link.

Response 200
{
"loginUrl": "https://cpanel.example.com/login/session/YOUR_TOKEN",
"expiresAt": null,
"singleUse": true
}
Response fields
loginUrlstring
A one-time link that logs in to the control panel.
expiresAtstring or null
Always null. The link’s exact lifetime is not known.
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.
404No web hosting account with this ID on your account. code is shared_hosting_not_found for an unknown ID and service_not_found for an account that is not yours. Treat both the same.
409The account is not active. serviceStatus says which status it has.
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.