Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.quepass.com/llms.txt

Use this file to discover all available pages before exploring further.

1. Init

Quepass.initializeQuepassSDK() is the first call your application must make. It authenticates the operator channel, prepares the SDK state, and stores a session token for all subsequent API calls. The SDK must be initialized once at app startup (e.g., inside @main App struct or SceneDelegate) before using any SDK features.

a. Function

Quepass.initializeQuepassSDK(
    baseURL: "https://your-api-base-url.com",
    username: "yourUsername",
    password: "yourPassword",
    channelId: "yourChannelId"
) 

b. Init Parameters

ParameterTypeRequiredDescription
baseURLstringYesRoot URL of the Quepass backend — no trailing slash
usernamestringYesOperator username registered with Quepass
passwordstringYesOperator password
channelIdstringYesChannel identifier issued by Quepass team
callBackfunctionYesCallback function executed after SDK initialization, returning status and outputModel

c. Init Response

Required Parameters

  • baseURL (string) – Root URL of the Quepass backend (no trailing slash)
  • username (string) – Operator username registered with Quepass
  • password (string) – Operator password
  • channelId (string) – Channel identifier issued by Quepass team
  • callBack (function) – Callback function executed after SDK initialization, returning status and outputModel

1. Success

Return Parameters

  • sessionId (string) – Unique identifier for the user session
  • token (string) – Authentication token for API access

Code Example

// Success
{
  "code": 200,
  "data": {
    "sessionId": "string",
    "token": "string"
  }
}

2. Failure

Return Parameters

  • code (number) – HTTP or API error code
  • errors (array) – List of error objects
    • code (string/number) – Error code identifier
    • message (string) – Detailed error description

Code Example

// Failure
{
  "code": "number",
  "errors": [
    {
      "code": "string | number",
      "message": "string"
    }
  ]
}

d. SDK Capabilities

Use Quepass.getSdkCapabilities to retrieve SDK information such as version details. The returned data should be used only if the success flag is true.

Required Parameters

empty

Return Parameters

data (object) – Object containing SDK metadata:
  • version (string) – SDK version
  • supportedPlatformVersion (object) – Supported browser versions:
    • minimum (string) – Minimum supported browser versions (e.g., "Chrome 90, Firefox 88, Safari 14, Edge 90")
    • maximum (string) – Maximum supported browser versions (e.g., "Latest")
  • apiVersion (array of strings) – Supported API versions
  • deviceInfo (object) – Device details:
    • model (string) – Device model
    • manufacturer (string) – Device manufacturer

Code Example

    Quepass.getSdkCapabilities { success, data in    
        if success, let info = data {    
            let version = info.version    
        }    
    }    

2. Configuration

Required Parameters

  • callBack (function) – Callback function executed after fetching the SDK configuration, returning configuration status and output data

Return Parameters

  • s_SessionTimeout (number|string) – session timeout duration
  • onboardingFlow (object|array) – configuration for onboarding flow
  • verificationFlow (object|array) – configuration for verification flow
  • govIntegration (boolean) – government integration enabled or not
  • allowedJourneys (array of strings) – list of allowed journeys

Code Example

Quepass.getCofiguration(callBack:)    

3. Code Example

Call this method on app startup (e.g., inside @main App struct or SceneDelegate) to initialize the SDK.
Quepass.initializeQuepassSDK(
    baseURL: "https://your-api-base-url.com",
    username: "yourUsername",
    password: "yourPassword",
    channelId: "yourChannelId"
) { status, outputModel in
    if !status {
        let error = outputModel.errors?.first?.message ?? "SDK initialization failed"
        print(error)
        return
    }
        
    Quepass.getCofiguration { configStatus, configOutput in
        if !configStatus {
            let error = configOutput.errors?.first?.message ?? "Failed to fetch configuration"
            print(error)
            return
        }

        // SDK ready
        if let data = configOutput.data {
            let configuration = data["configuration"] as? [String: Any]
            // Use configuration
        }
    }
}
Initialize the SDK once before using any features.