Skip to content

SSO and deep links ​

This page explains how to open the client panel without a password: one-time SSO links from billing, deep links straight to a specific section, and the Login as button for staff.

How it works ​

  1. Billing or staff request a link with POST /v1/accounts/{id}/client-login.
  2. The panel returns a url on the client panel origin (port 2083) that is valid for 60 seconds and can be used only once.
  3. The customer's browser opens url. The panel exchanges the link for a client panel session of 8 hours (HttpOnly cookie, SameSite=Lax), then opens the target page.
text
Customer ──clicks "Log in to panel"──▶ Billing
Billing ──POST /v1/accounts/{id}/client-login──▶ Panel (8443)
Billing ◀── {url, expiresAt} ──────────────────── Panel
Customer ──redirect to url──▶ Client panel (2083) /login/sso/TOKEN ──▶ 8-hour session

TIP

Request the link exactly when the customer clicks the button, then redirect right away. Do not create links ahead of time or keep them on a page, because they expire in 60 seconds.

bash
curl -sS -X POST https://panel.example.com:8443/v1/accounts/ACCOUNT_ID/client-login \
  -H "X-API-Key: API_KEY"
json
{"url": "https://panel.example.com:2083/login/sso/TOKEN", "expiresAt": "2026-11-09T03:01:00Z"}
  • A billing key can only create links for accounts of its owner.
  • Accounts with status active, management-disabled, or suspended can be opened. Suspended accounts are read-only in the client panel.
  • provisioning, terminating, or terminated accounts are refused with 409 cp.client_account_inactive.
  • If the client panel is not configured on the panel server, the request is refused with the message "panel client belum dikonfigurasi" (client panel is not configured).

Every link is recorded in the audit log as client.login_link.

An optional body chooses the page that opens:

bash
curl -sS -X POST https://panel.example.com:8443/v1/accounts/ACCOUNT_ID/client-login \
  -H "X-API-Key: API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"section": "email", "target": "info@myshop.com"}'

Without a body or without section, the panel opens the home page (overview).

Sections ​

sectionPage in the client paneltarget
overviewOverviewno
websitesWebsitesWebsite ID or account domain
sslWebsite SSLWebsite ID or account domain
phpWebsite PHPWebsite ID or account domain
emailEmailAccount domain or mailbox address on an account domain
dnsDNSAccount zone name
databasesDatabasesno
filesFiles (File Manager)no
backupsBackupno
cronCronno
ftpFTP accountsno
sshSSH keysno
appsAppsno
securitySecurityno
terminalWeb terminalno

The sections your panel supports are also listed in GET /v1/billing/capabilities (deepLinkSections).

Validation rules ​

  • A section outside the list is refused with 400 cp.section_invalid.
  • target must belong to that account. A target of another account, or a target for a section that does not accept one, is refused with 400 cp.client_invalid.
  • Free-form destination URLs (returnUrl, url, redirect) are refused with 400. The section and target are signed into the link, and the panel builds the destination path itself. That way an SSO link cannot be used as an open redirect.

The terminal section ​

section=terminal opens the account's web terminal in the client panel directly. The requirements are the same as opening the terminal from the menu:

  • the package has the SSH feature;
  • the account's SFTP/SSH access is on;
  • the account is active.

If a requirement is not met, the panel shows which one is missing. The shell is always jailed, closes after 30 minutes idle or 4 hours, and opening it is recorded in the audit log as terminal.open.

Database manager SSO ​

Billing can also open the database managers directly with a 60-second one-time link. These endpoints are client operations, so the X-Billing-Client-ID header is required.

bash
curl -sS -X POST https://panel.example.com:8443/v1/accounts/ACCOUNT_ID/databases/phpmyadmin \
  -H "X-API-Key: API_KEY" \
  -H "X-Billing-Client-ID: 1001"
EndpointFor
POST /v1/accounts/{id}/databases/phpmyadminphpMyAdmin (MariaDB)
POST /v1/accounts/{id}/pgsql/adminneoAdminNeo (PostgreSQL); 409 cp.adminneo_no_database when the account has no PostgreSQL database yet

WordPress admin SSO ​

POST /v1/accounts/{id}/apps/{appId}/sso returns a one-time link that signs in to the WordPress dashboard of an installation as its first administrator. It works for installations made by the panel and for detected ones. For billing keys this is a client operation (scope websites), so X-Billing-Client-ID is required.

bash
curl -sS -X POST https://panel.example.com:8443/v1/accounts/ACCOUNT_ID/apps/APP_ID/sso \
  -H "X-API-Key: API_KEY" \
  -H "X-Billing-Client-ID: 1001"
  • The response contains url and user (the administrator login). The link is valid for 60 seconds and works only once.
  • Add &redirect=<page>.php to the URL to open a specific wp-admin page.
  • 409 when the app is busy or the installation has no administrator.
  • Audited as app.wp.sso.

Login as for staff ​

Staff can open the client panel as the account owner to help troubleshoot.

  1. Open Accounts, then pick the account.
  2. Click Login as at the top of the account page.
  3. The client panel opens in a new tab.

Good to know:

  • The button appears for staff with write permission (admin and technician), and not for accounts that are provisioning, terminating, or terminated.
  • The client panel shows an Administrator session banner stating that every action is audited.
  • The audit log records the staff member as the actor on behalf of the account.
  • Staff cannot change the client's 2FA from this session.

Password login ​

Besides SSO, customers can log in to the client panel directly with the account username and a panel password. The password is set with:

bash
curl -sS -X PUT https://panel.example.com:8443/v1/accounts/ACCOUNT_ID/client-password \
  -H "X-API-Key: API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"password": "PASSWORD_AT_LEAST_10_CHARS"}'
  • At least 10 characters. An empty password turns password login off.
  • Changing or removing the password ends all client panel sessions of that account.
  • Customers can enable 2FA (TOTP) for password login. 2FA does not apply to SSO and Login as, because both are already authenticated on the billing or admin side.
  • If a customer loses their 2FA device, billing or an admin resets it with DELETE /v1/accounts/{id}/client-totp.
  • Repeated failed passwords from one IP lock the login temporarily (429).

See also ​

MoorCP Shared, a shared hosting panel for server fleets.