{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Functions","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"functions","__idx":0},"children":["Functions"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initializesdk","__idx":1},"children":["initializeSDK"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initializeSDK"]},"({",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationFile"]},"}): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<void>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the SDK using a configuration file (iOS plist or Android auto-detected configuration)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":2},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationFile"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Name of the configuration file (without extension on iOS)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":3},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"final orchestration = FlutterTsIdentityOrchestration();\nawait orchestration.initializeSDK(configurationFile: 'TransmitSecurity');\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"initialize","__idx":4},"children":["initialize"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["initialize"]},"({",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]},"}): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<void>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initializes the SDK with explicit parameters."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-1","__idx":5},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clientId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Your Mosaic client ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Configuration options (see below)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Options:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Key"},"children":["Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["serverPath"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Server URL (default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.transmitsecurity.io"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resource"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Custom resource path"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pollingTimeout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["int?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Polling timeout in milliseconds"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["locale"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Locale setting (default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'en'"]},")"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-1","__idx":6},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await orchestration.initialize(\n  clientId: 'CLIENT_ID',\n  options: {\n    'serverPath': 'https://api.transmitsecurity.io',\n    'pollingTimeout': 30000,\n    'locale': 'en',\n  },\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"journeyresponsestream","__idx":7},"children":["journeyResponseStream"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["journeyResponseStream"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Stream<Map<String, dynamic>>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Stream that delivers real-time journey events. This is the only way the SDK communicates journey responses to your app."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["must"]}," listen to this stream ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["before"]}," starting any journey. Without an active listener, your app will not receive journey responses—steps, authentication results, and errors will be lost."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"response-format","__idx":8},"children":["Response format"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Key"},"children":["Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Whether the response represents a successful step"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["response"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Response data including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyStepId"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Error message if ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Response type (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'instructions'"]},")"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["instructions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional instructions data when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'instructions'"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"instructions-callback","__idx":9},"children":["Instructions callback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When calling ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["submitClientResponse"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startMobileApproveJourney"]},", the native SDK may trigger additional instructions through the event stream. These are delivered as responses with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'instructions'"]}," and should be handled separately from regular journey step responses."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-2","__idx":10},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"orchestration.journeyResponseStream.listen(\n  (response) {\n    if (response['type'] == 'instructions') {\n      final instructions = response['instructions'];\n      // Handle native SDK instructions\n      return;\n    }\n\n    if (response['success'] == true) {\n      final stepId = response['response']?['journeyStepId'];\n      // Handle journey step\n    } else {\n      print('Error: ${response['error']}');\n    }\n  },\n  onError: (error) {\n    print('Stream error: $error');\n  },\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"startjourney","__idx":11},"children":["startJourney"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["startJourney"]},"({",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]},"}): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<void>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Starts an orchestration journey. Responses are delivered via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyResponseStream"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-2","__idx":12},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The journey identifier configured in the Admin Portal"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["options"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Journey options (see below)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Options:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Key"},"children":["Key"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["additionalParams"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, String>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Additional parameters to pass to the journey"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flowId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Custom flow identifier"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["encryptionMode"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Enable encryption for the journey session"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-3","__idx":13},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await orchestration.startJourney(\n  journeyId: 'registration-flow',\n  options: {\n    'additionalParams': {'userType': 'premium'},\n    'encryptionMode': true,\n  },\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"submitclientresponse","__idx":14},"children":["submitClientResponse"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["submitClientResponse"]},"({",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["responseId"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]},"}): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<bool>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submits a client response during a journey flow. The next step is delivered via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyResponseStream"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-3","__idx":15},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["responseId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Identifier for the response type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>?"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Data to submit"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Common response IDs:"]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"ID"},"children":["ID"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'clientInput'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Submit user input"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'cancel'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Cancel current step"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'fail'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Mark step as failed"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'resend'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Request resend (e.g., OTP)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns","__idx":16},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},"—",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if the response was submitted successfully."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-4","__idx":17},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await orchestration.submitClientResponse(\n  responseId: 'clientInput',\n  data: {'email': 'user@example.com', 'password': 'secret'},\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Platform differences"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response ID for login form submissions may differ between platforms. On Android, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'password'"]},"; on iOS, use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'Password'"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"import 'dart:io' show Platform;\n\nfinal responseId = Platform.isAndroid ? 'password' : 'Password';\nawait orchestration.submitClientResponse(\n  responseId: responseId,\n  data: {'username': username, 'password': password},\n);\n","lang":"dart"},"children":[]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"startmobileapprovejourney","__idx":18},"children":["startMobileApproveJourney"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["startMobileApproveJourney"]},"({",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startJourneyOptions"]},"}): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<void>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Starts a mobile approve journey. Responses are delivered via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["journeyResponseStream"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-4","__idx":19},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Mobile approve payload (e.g., session data)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["startJourneyOptions"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Map<String, dynamic>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["Journey options (e.g., encryption settings)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-5","__idx":20},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await orchestration.startMobileApproveJourney(\n  payload: {'sessionId': 'session-123'},\n  startJourneyOptions: {'encrypted': true},\n);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"generatedebugpin","__idx":21},"children":["generateDebugPin"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["generateDebugPin"]},"(): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<String>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Generates a debug PIN for development and testing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-1","__idx":22},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]},"—the generated debug PIN."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-6","__idx":23},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"final pin = await orchestration.generateDebugPin();\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setloggingenabled","__idx":24},"children":["setLoggingEnabled"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setLoggingEnabled"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enabled"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<bool>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enables or disables SDK logging."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-5","__idx":25},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["enabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," to enable logging, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to disable"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"returns-2","__idx":26},"children":["Returns"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bool"]},"—",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}," if the configuration was applied successfully."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-7","__idx":27},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"await orchestration.setLoggingEnabled(true);\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"setpushtoken","__idx":28},"children":["setPushToken"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["▸ ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["setPushToken"]},"(",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]},"): ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Future<void>"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sets the push notification token for the SDK to enable push-based flows."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters-6","__idx":29},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Name"},"children":["Name"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"left","data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["String"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"left"},"children":["The push notification token from Firebase or APNs"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-8","__idx":30},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"dart","header":{"controls":{"copy":{}}},"source":"final token = await FirebaseMessaging.instance.getToken();\nif (token != null) {\n  await orchestration.setPushToken(token);\n}\n","lang":"dart"},"children":[]},{"$$mdtype":"Tag","name":"style","attributes":{},"children":["\ntable th:first-of-type {\n    width: 30%;\n}\ntable th:nth-of-type(2) {\n    width: 30%;\n}\ntable th:nth-of-type(3) {\n    width: 40%;\n}\n"]}]},"headings":[{"value":"Functions","id":"functions","depth":1},{"value":"initializeSDK","id":"initializesdk","depth":2},{"value":"Parameters","id":"parameters","depth":3},{"value":"Example","id":"example","depth":3},{"value":"initialize","id":"initialize","depth":2},{"value":"Parameters","id":"parameters-1","depth":3},{"value":"Example","id":"example-1","depth":3},{"value":"journeyResponseStream","id":"journeyresponsestream","depth":2},{"value":"Response format","id":"response-format","depth":3},{"value":"Instructions callback","id":"instructions-callback","depth":3},{"value":"Example","id":"example-2","depth":3},{"value":"startJourney","id":"startjourney","depth":2},{"value":"Parameters","id":"parameters-2","depth":3},{"value":"Example","id":"example-3","depth":3},{"value":"submitClientResponse","id":"submitclientresponse","depth":2},{"value":"Parameters","id":"parameters-3","depth":3},{"value":"Returns","id":"returns","depth":3},{"value":"Example","id":"example-4","depth":3},{"value":"startMobileApproveJourney","id":"startmobileapprovejourney","depth":2},{"value":"Parameters","id":"parameters-4","depth":3},{"value":"Example","id":"example-5","depth":3},{"value":"generateDebugPin","id":"generatedebugpin","depth":2},{"value":"Returns","id":"returns-1","depth":3},{"value":"Example","id":"example-6","depth":3},{"value":"setLoggingEnabled","id":"setloggingenabled","depth":2},{"value":"Parameters","id":"parameters-5","depth":3},{"value":"Returns","id":"returns-2","depth":3},{"value":"Example","id":"example-7","depth":3},{"value":"setPushToken","id":"setpushtoken","depth":2},{"value":"Parameters","id":"parameters-6","depth":3},{"value":"Example","id":"example-8","depth":3}],"frontmatter":{"title":"Functions","seo":{"title":"Functions"}},"lastModified":"2026-10-22T11:51:00.132Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/flutter-ts-identity-orchestration/functions","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}