Kiosk Session Management

Start Kiosk Session

Once you have obtained the authorized JWT, you can start a session on a specific kiosk using the session/start endpoint.

Request

POST [host]/api/session/start

Headers

HeaderValueDescription
Content-Typeapplication/json
AuthorizationBearer <your_auth_token>The JWT obtained from the /api/auth endpoint.

Body (JSON)

{
    "kiosk_id": "[kiosk_id]"
}

Response Example

The session token provided in the response enables you to call session-specific methods to interact with the kiosk hardware.

{
    "success": true,
    "message": "Session open",
    "kiosk_id": "kiosk_id_example",
    "session_id": "d5509e19-140e-8c71-c2dd-799c6c6a18e2",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1[…]",
    "request_id": "ad1f4f2b962b400714301bd3dcb143f6"
}

Session Token Usage Example

Scan a Document

Use the session token to interact with the kiosk devices, such as the scanner.

GET [host]/api/session/scanner/scan

Headers

HeaderValueDescription
Content-Typeapplication/json
AuthorizationBearer <your_auth_token>Use the token received from the /session/start response

Response Example

{
    "success": true,
    "message": "Scan done",
    "image": "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAA[...]",
    "request_id": "49f907cee6add682f38d7da4de4b6191"
}

[!TIP] The image is returned as a Base64 encoded string, which you can directly embed in an img tag or convert to a file.