Generate a client access token
Changed onGenerates a temporary JWT access token used to initialize zerohash SDK modules on behalf of one of your end users. The platform authenticates to this endpoint with its own HMAC credentials; the returned JWT is then handed to the end-user client.
Identifying the end user:
- The Onboarding SDK accepts email to start a fresh onboarding, or participant_code to resume an existing user from where they dropped off. For a retry, send email and participant_code together — zerohash resolves the existing participant and the SDK comes up pre-filled (it is not participant_code alone).
- To open the Onboarding SDK for tax certification only (onboardingFlow: "tax_only") for a user who is already onboarded, send participant_code with the update-participant permission. See the Onboarding SDK - Tax certification only example.
- All other SDK experiences require participant_code (the user already exists).
Choosing a variant: the request body is an anyOf — pick the variant matching the SDK experience you are launching, set permissions accordingly, and include only that variant’s fields.
💡 Use the schema dropdown / per-variant examples on the request body below to load a ready-made payload for each experience.
Auto-revoke previous token (optional, off by default): when zerohash enables this setting for your platform, issuing a new client access token for a participant_code automatically revokes the token previously issued for that same participant. The previous token is rejected on its next request (403, JWT token is revoked) — immediately, with no grace period. Revocation is scoped to the {platform, participant} pair. /revoke_auth_token keeps working independently. Leave the setting off if your integration relies on multiple concurrent tokens per participant; contact your zerohash representative to enable it.
Request
- Base URLhttps://api.cert.zerohash.com
- URLhttps://api.cert.zerohash.com/client_auth_token
- AuthAPI key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE
Headers
HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.
Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.
Request body
Example request
{
"permissions": [
"onboarding"
],
"reference_id": "a81bc81b-dead-4e5d-abff-90865d1e13b1",
"email": "jane.doe@example.com"
}Response
Client access token successfully generated.
Example response
{
"message": {
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHBsaWNhdGlvbl9pZCI6IiIsImRldmljZV9pZCI6IiIsImV4cCI6MTc2MzAyMjA0OCwiaXNzIjoiMmM5YTkxOGUtMGZiMy00YjQ3LTkxZWMtYmVmYTYyZjNhNTJmIiwianRpIjoiZmRj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}Changes
- breaking
removed
subschema #2: Account Funding SDK - Depositssubschema #3: Account Funding SDK - Account Linksubschema #4: Account Funding SDK - Withdrawalssubschema #5: Participant Profile SDKsubschema #6: Payins SDKsubschema #7: Crypto Withdrawals SDKsubschema #8: Crypto Payouts SDKsubschema #9: Crypto Buy SDKsubschema #10: Crypto Sell SDKfrom the request bodyoneOflist - info
added
subschema #1: Onboarding SDK - New user (email)subschema #2: Onboarding SDK - Existing user (resume / retry)subschema #3: Onboarding SDK - Tax certification only (existing participant)subschema #4: Update Participantsubschema #5: Account Funding SDK - Depositssubschema #6: Account Funding SDK - Account Linksubschema #7: Account Funding SDK - Withdrawalssubschema #8: Fiat Deposit SDKsubschema #9: Fiat Withdraw SDKsubschema #10: Fiat Account Link SDKsubschema #11: Participant Profile SDKsubschema #12: Payins SDKsubschema #13: Crypto Deposits SDKsubschema #14: Crypto Withdrawals SDKsubschema #15: Crypto Payouts SDKsubschema #16: Crypto Buy SDKsubschema #17: Crypto Sell SDKto the request bodyanyOflist
- breaking