Browse the api reference

SSO Token Exchange

post/v1/auth/sso-exchange

Part of Auth: SSO.

Step 2 of 3. Exchanges the SSO token for a short-lived session ID. Avoids passing tokens in redirect URLs.

Authentication

This operation does not require an API key.

Request body

Required, application/json.

FieldTypeDescription
tokenrequiredstring

Temporary SSO token

target_apprequiredstring

Target application identifier

return_urloptionalstring

Optional return URL after authentication

browser_nonce_hashoptionalstring

SHA-256 (hex) of a nonce the target app minted in the browser that is signing in. Completion must present the nonce, so the handoff cannot be redeemed by any other browser; a session exchanged without one cannot be completed.

Constraints: matches ^[0-9a-f]{64}$

Example request

curl
curl -X POST "https://api.robosystems.ai/v1/auth/sso-exchange" \
  -H "Content-Type: application/json" \
  -d '{
  "token": "string",
  "target_app": "string"
}'

Responses

200 Successful Response

FieldTypeDescription
session_idrequiredstring

Temporary session ID for secure handoff

redirect_urlrequiredstring

URL to redirect to for authentication

expires_atrequiredstring (date-time)

Session expiration time

StatusMeaning
400Invalid request
422Validation Error
429Rate limit exceeded
500Internal server error