Affiliate SSO Link
/a/affiliates/sso-linkMint a single-use link that signs an affiliate into the affiliate portal without a password — for embedding the portal in your own app (webview). Available on request: contact support to have it enabled for your account. Then turn it on under Settings → Customize → Security → Portal Embedding → Sign-in from your app; until then every call returns 403 sso_not_enabled. Call it from your server after your app has authenticated the user, then open the returned login_url. The link expires after 120 seconds and works once. Identify the affiliate by your own external_id, our affiliate_id, or email; external_id is linked on first match so later calls can send it alone. With create=true an affiliate that does not exist yet is created on the spot (just-in-time provisioning) — first_name and email are then required; such affiliates get no welcome e-mail and are app-only unless you send password_login=true. password_login=false makes any affiliate app-only (no password sign-in, no password-reset e-mail); true allows it again. Captcha is skipped; an affiliate who has set up two-factor authentication is asked for their code once per sign-in unless you turn off Ask for the 2FA code on app sign-ins under Settings → Customize → Security → Portal Embedding. If your affiliates use the portal on your own white-label domain, send it as host. To open the link in an <iframe> on your website instead of a webview, first add that site under Settings → Customize → Security → Portal Embedding.
Authentication
Domain ID — your network's tenant ID (header: X-Domain-Id)
API Key (header: X-Api-Key)
Secret Key (header: X-Api-Secret)
Request Body *
Send at least one identifier: external_id, affiliate_id or email. With create=true, email and first_name are required as well.
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
external_id | string | One of | Your app's id for this user. Linked to the affiliate on first match, so later calls can send it alone. |
affiliate_id | integer | One of | Our affiliate id. |
email | string | One of | Affiliate e-mail. Required when create=true. |
create | boolean | No | Create the affiliate if no match is found. |
first_name | string | No | Required when create=true. |
last_name | string | No | |
company | string | No | |
phone | string | No | |
status | string (ACTIVE | PENDING) | No | Status for a newly created affiliate. PENDING creates the account but returns no link until you approve it. |
redirect_to | string | No | Optional portal path to land on after login (must start with "/"). Defaults to the dashboard. |
chrome | string (full | minimal | none) | No | How much portal navigation to show. full (default): the normal top bar and sidebar. minimal: a compact bar with a menu drawer — best for a webview. none: page content only, for apps that drive navigation themselves by loading portal URLs. Within the session, any portal URL can switch it with ?chrome=full|minimal|none. |
host | string | No | Portal host the link opens on — send it when your affiliates use the portal on your own white-label domain, since a sign-in holds only on the host it happened on. Must be your platform subdomain or one of your active, verified white-label portal domains. Defaults to your platform subdomain. |
password_login | boolean | No | Whether this affiliate may also sign in with a password. false makes the account SSO-only: the login form, forgot-password mail and affiliate-login API refuse it. Affiliates created by this call default to false; existing affiliates keep their setting unless you send it. |
Responses
| Status | Description |
|---|---|
| 200 | Link minted |
| 409 | external_id and affiliate_id/email point to different affiliates (identity_conflict), or another request is creating the same affiliate — retry (provisioning_in_progress) |
| 403 | Sign-in from your app is turned off in Settings (sso_not_enabled), the affiliate is pending, suspended or deleted (account_not_active), or creating it would exceed your plan's affiliate limit (plan_limit_reached) |
| 404 | Affiliate not found on this account |
| 422 | Validation error — for example, no identifier sent (external_id, affiliate_id and email all missing), or a host that is not one of your portal domains |