User Pre-Authorization
This section covers two approaches for authenticating users from your backend. Silent Authentication pre-authorizes users before they open the widget — they skip the login step entirely. API-Based Authentication is used exclusively for the Submit Documents KYC flow and does not authenticate users in the widget.
Silent Authentication
Silent authentication lets your users skip the login step in the widget by passing a short-lived token in the URL. Mercuryo handles the authentication on its end — no user credentials are shared with you.
Before using silent authentication, you must obtain the user's consent to Mercuryo's Terms of Service on your side.
All endpoints below require the Sdk-Partner-Token header. Contact your integration manager to obtain it.
Silent Sign-Up
For users who don't have a Mercuryo account yet.
Endpoint: POST /v1.6/sdk-partner/sign-up
Required body parameters:
email— user's email addressaccept— user's consent to the Terms of Service (you collect this on your frontend)
Optional parameters:
language_code— default:en-USshare_token— SumSub token for pre-verified KYC (see KYC)
Response includes:
init_token— widget sign-in token (valid for 1 hour or until first widget visit)init_token_type— alwayssdk_partner_authorizationuser_uuid— user's Mercuryo UUID
Steps:
- Call
POST /v1.6/sdk-partner/sign-upto getinit_tokenandinit_token_type. - Pass these as URL parameters when redirecting the user to the widget.
- Show your widget.
https://exchange.mercuryo.io/?widget_id=YOUR_WIDGET_ID
&init_token_type=sdk_partner_authorization
&init_token=0a25dd714163a9006
Silent Sign-Up + SumSub KYC
For users who already have a verified KYC on your SumSub instance.
Same as Sign-Up but also include share_token in the request body:
POST /v1.6/sdk-partner/sign-up
{
"email": "user@example.com",
"accept": true,
"share_token": "_act-ca0dae00-0ecd-000d-00e0-00d0ca000b0d"
}
Widget URL with both tokens:
https://exchange.mercuryo.io/?widget_id=YOUR_WIDGET_ID
&init_token_type=sdk_partner_authorization
&init_token=0a25dd714163a9006
&share_token=_act-ca0dae00-0ecd-000d-00e0-00d0ca000b0d
Silent Sign-In
For users who already have a Mercuryo account.
Endpoint: POST /v1.6/sdk-partner/login
Identify the user by one of:
emailphoneuser_uuid4
Response includes:
init_tokeninit_token_typeuser_uuid
Steps:
- Call
POST /v1.6/sdk-partner/loginto getinit_tokenandinit_token_type. - Pass them as URL parameters.
- Show your widget.
https://exchange.mercuryo.io/?widget_id=YOUR_WIDGET_ID
&init_token_type=sdk_partner_authorization
&init_token=0a25dd714163a9006
API-Based Authentication
This approach uses API calls to authenticate users. Unlike silent authentication, user information is shared with you during the process.
Each API request must include one of two tokens in the header:
| Token | Header | Used when |
|---|---|---|
Sdk-Partner-Token |
Sdk-Partner-Token: <token> |
User is not yet authenticated (sign-in requests) |
Sdk-User-Token |
Sdk-User-Token: <token> |
User is already authenticated (user-specific requests) |
Sdk-User-Token is returned as bearer_token in the sign-in response. It expires in 24 hours in Production and does not expire in Sandbox.
Before signing up, the user must accept the Terms of Service on your frontend. Pass their consent in the accept parameter.
OTP-less Sign-In
Use when you have already verified the user's email and identity on your side, and no additional verification is required.
- Obtain
Sdk-Partner-Tokenfrom your integration manager. - Call
POST /v1.6/sdk-partner/user/sign-in-no-verifywith the user's email.
Sign-In with OTP Verification
Use when the user must verify their email via a one-time code.
- Obtain
Sdk-Partner-Tokenfrom your integration manager. - Call
POST /v1.6/sdk-partner/user/sign-inwith the user's email. An OTP is sent to the user. - Call
POST /v1.6/sdk-partner/user/sign-in/verifywith the OTP entered by the user.- To resend the OTP:
POST /v1.6/sdk-partner/user/sign-in/verify/resend
- To resend the OTP: