Skip to main content
POST
Mint a desktop app token

Body

application/json

Request payload to mint a native-app (desktop) session token.

Called by the frontend after a normal browser (cookie) login when the login was initiated by the desktop app: it exchanges the just-established session for a long-lived app token the frontend then hands to the app via the redirectUri deep-link. The redirectUri must be a registered desktop scheme (e.g. nvisy://…), so a token cannot be minted toward a web origin.

Request payload to mint a native-app (desktop) session token.

Called by the frontend after a normal browser (cookie) login when the login was initiated by the desktop app: it exchanges the just-established session for a long-lived app token the frontend then hands to the app via the redirectUri deep-link. The redirectUri must be a registered desktop scheme (e.g. nvisy://…), so a token cannot be minted toward a web origin.

redirectUri
string
required

The desktop deep-link the app will receive the token on. Must match a configured desktop redirect scheme.

Required string length: 1 - 2048

Response

The result of minting a native-app (desktop) session token.

The frontend hands apiToken to the desktop app via the redirectUri deep-link ({redirectUri}?token={apiToken}); the app stores it and sends it as an Authorization: Bearer credential. Browser web sessions use cookies instead and return no token.

The result of minting a native-app (desktop) session token.

The frontend hands apiToken to the desktop app via the redirectUri deep-link ({redirectUri}?token={apiToken}); the app stores it and sends it as an Authorization: Bearer credential. Browser web sessions use cookies instead and return no token.

apiToken
string
required

The signed app JWT to send as a Bearer token.

redirectUri
string
required

The desktop deep-link the token should be delivered on, echoed back.