Exchange a PDS-minted service auth token for a gateway session. The service auth JWT travels in the Authorization header (aud = the gateway DID, lxm = this NSID) and is single-use. Browser callers (Origin header present) receive the session as an HttpOnly cookie and no sessionToken is returned.
Input
application/jsonplatform
string
Required
Client platform requesting the session. Web always receives cookie mode; other platforms receive token mode unless the request carries an Origin header.
maxLength: 100 bytesOutput
application/jsonsessionToken
string
Optional
Opaque session token (token mode only). Absent in cookie mode.
Try It
Requests are sent directly from your browser. Some servers may block requests due to CORS.
View raw schema
{
"type": "procedure",
"input": {
"schema": {
"type": "object",
"required": [
"platform"
],
"properties": {
"platform": {
"type": "string",
"maxLength": 100,
"description": "Client platform requesting the session. Web always receives cookie mode; other platforms receive token mode unless the request carries an Origin header.",
"knownValues": [
"android",
"ios",
"desktop",
"web"
]
}
}
},
"encoding": "application/json"
},
"output": {
"schema": {
"type": "object",
"properties": {
"sessionToken": {
"type": "string",
"maxLength": 8192,
"description": "Opaque session token (token mode only). Absent in cookie mode."
}
}
},
"encoding": "application/json"
},
"description": "Exchange a PDS-minted service auth token for a gateway session. The service auth JWT travels in the Authorization header (aud = the gateway DID, lxm = this NSID) and is single-use. Browser callers (Origin header present) receive the session as an HttpOnly cookie and no sessionToken is returned."
}