curl --request POST \
--url https://hiimpria.ai/api/auth/sdk-sign \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"email": "john.doe@domain.edu",
"profilename": "John Doe",
"usertype": 4,
"userid": 110,
"institutionid": "f831501f-b645-481a-9cbb-331509aaf8c1",
"task": "do"
},
"institutionId": "f831501f-b645-481a-9cbb-331509aaf8c1"
}
'{
"success": true,
"launch_token": "a1b2c3d4e5f6...",
"nonce": "f47ac10b58cc4372a5670e02b2c3d479",
"timestamp": 1740500000
}{
"success": false,
"message": "Invalid institution"
}{
"success": false,
"message": "Unauthorized origin"
}SDK Launch
Sign SDK launch parameters
Not available on consumer app hosts: requests return 403 LAUNCH_SIGNIN_OFF. Open Pria directly to sign in.
Signs launch parameters with a server-held HMAC-SHA256 secret for secure SDK iframe embedding.
Called by pria-sdk.js before creating the launch iframe.
Security model:
- The signing secret (
SDK_LAUNCH_SECRET) is never exposed to the client - Parameters are canonicalized (all values stringified,
launch_*keys stripped) to ensure consistent HMAC computation across sign and verify, since URL query strings coerce values to strings - A cryptographic nonce and timestamp are included to prevent replay attacks
- The token expires after 10 minutes
Origin validation:
- For institution-specific launches, the request
OriginorRefererheader is validated against the institution’spublicAuthorizedUrlsusing exact hostname comparison - In development mode (
NODE_ENV !== 'production'),file://origins (null/missing Origin header) are allowed
Digital twin selector mode:
- When
institutionIdis an empty string andparams.digitaltwinis true, institution lookup and origin validation are skipped. The user will be presented with their existing digital twins or the option to create a new one.
POST
/
api
/
auth
/
sdk-sign
curl --request POST \
--url https://hiimpria.ai/api/auth/sdk-sign \
--header 'Content-Type: application/json' \
--data '
{
"params": {
"email": "john.doe@domain.edu",
"profilename": "John Doe",
"usertype": 4,
"userid": 110,
"institutionid": "f831501f-b645-481a-9cbb-331509aaf8c1",
"task": "do"
},
"institutionId": "f831501f-b645-481a-9cbb-331509aaf8c1"
}
'{
"success": true,
"launch_token": "a1b2c3d4e5f6...",
"nonce": "f47ac10b58cc4372a5670e02b2c3d479",
"timestamp": 1740500000
}{
"success": false,
"message": "Invalid institution"
}{
"success": false,
"message": "Unauthorized origin"
}Body
application/json
Response
Parameters signed successfully
Was this page helpful?