### Install @trinsic/web-ui with npm Source: https://docs.trinsic.id/reference/ui-web Install the package using npm. ```sh npm install @trinsic/web-ui ``` -------------------------------- ### Install @trinsic/expo-ui Source: https://docs.trinsic.id/reference/ui-expo Install the Expo UI library package using npm. ```sh npm install @trinsic/expo-ui ``` -------------------------------- ### info Parameter Example Source: https://docs.trinsic.id/docs/zero-access-hpke Example of the `info` parameter for a session-results domain with a specific context UUID. The version is always 1, and the context is a domain-specific structure. ```csharp trinsic-hpke:1:session-results:6725f68a-5501-80c2-9c85-c5f36fbc602a ``` -------------------------------- ### Example rawMdlOutput.nameSpaces JSON Source: https://docs.trinsic.id/docs/usa-california-dmv Shows the structure of the rawMdlOutput.nameSpaces field with sample data for a US mDL, including family_name, given_name, birth_date, and age_over_21. ```json { "org.iso.18013.5.1": { "family_name": { "type": "String", "value": "DOE" }, "given_name": { "type": "String", "value": "JOHN" }, "birth_date": { "type": "String", "value": "2000-03-27" }, "age_over_21": { "type": "Boolean", "value": "true" } } } ``` -------------------------------- ### Create Session Request with preview_raw18013Request (commented) Source: https://docs.trinsic.id/docs/samsung-wallet-available-18013-documents JSON example showing how to specify a custom 18013 request in the providerInput field for Samsung Wallet. Includes comments explaining the structure: documentRequests array, documentType, nameSpaces map with willRetain flags. ```json { "verificationProfileId": "...", "provider": "samsung-wallet", // Other fields omitted "providerInput": { "samsung-wallet": { "preview_raw18013Request": { // `documentRequests` is an array of requests, each describing a single document. // A credential which satisfies *any* of the requests can be used by the user. // Only a single credential is collected and returned. "documentRequests": [ { // The document type to request -- see Trinsic's documentation // for a list of all valid document types for Samsung Wallet "documentType": "org.iso.18013.5.1.mDL", // A map of (nameSpaceName -> map(fieldName -> willRetain)), where: // - nameSpaceName is a namespace within the document // - fieldName is a field within the given namespace // - willRetain indicates whether you intend to store the data beyond the scope of the immediate transaction "nameSpaces": { "org.iso.18013.5.1": { // `given_name` is required, and will be stored by the requester "given_name": true, // `portrait` is required, and will NOT be stored by the requester "portrait": false } } } ] } } } } ``` -------------------------------- ### GET /api/valpha/verification-profiles/{id} Source: https://docs.trinsic.id/reference/getverificationprofilebyid Gets a specific verification profile by ID. The profile ID is provided as a path parameter. ```APIDOC ## GET /api/valpha/verification-profiles/{id} ### Description Gets a specific verification profile by ID. ### Method GET ### Endpoint /api/valpha/verification-profiles/{id} ### Parameters #### Path Parameters - **id** (string, uuid) - Required - The unique identifier of the verification profile. ### Response #### Success Response (200) Returns the verification profile details. #### Error Responses - **400** - Bad request - **401** - Unauthorized - **403** - Forbidden - **500** - Internal server error ``` -------------------------------- ### GET /sessions Source: https://docs.trinsic.id/reference/listsessions Retrieves a list of verification sessions. Supports filtering by state, ordering, and pagination. ```APIDOC ## GET /sessions ### Description Retrieves a list of verification sessions. Supports filtering by state, ordering, and pagination. ### Method GET ### Endpoint /sessions ### Parameters #### Query Parameters - **state** (string) - Optional - Filter sessions by state. Possible values: `Created`, `Pending`, `InProgress`, `Completed`, `Failed`, `Canceled`. - **orderBy** (string) - Optional - Order sessions by a field. Possible values: `Created`, `Updated`, `State`. - **pageSize** (integer) - Optional - Number of sessions to return per page. - **pageToken** (string) - Optional - Token for pagination. ### Response #### Success Response (200) - **sessions** (array) - List of session objects. - **nextPageToken** (string) - Token for the next page, if any. #### Response Example { "sessions": [ { "id": "string", "state": "string", "errorCode": "string", "created": 1722526411, "updated": 1722526722 } ], "nextPageToken": "string" } ### Error Handling - **401 Unauthorized** - Missing or invalid Bearer token. - **400 Bad Request** - Invalid query parameters. ### Authentication Requires a Bearer token (Trinsic Connect API Key) in the Authorization header. ``` -------------------------------- ### Use custom scheme in redirectUrl Source: https://docs.trinsic.id/reference/ui-android Example redirectUrl using the custom scheme. The path (callback) can be any valid path string. ```text acme-corp-shopping-app-trinsic-redirect:///callback ``` -------------------------------- ### Add TrinsicUI pod to Podfile Source: https://docs.trinsic.id/reference/ui-swift Add the TrinsicUI pod to your Podfile with the latest version and run pod install. ```ruby pod 'TrinsicUI', '~> [latest version]' ``` -------------------------------- ### GET /api/v1/verification-profiles/{verificationProfileId}/sessions Source: https://docs.trinsic.id/reference/listsessions Lists sessions created for a specific Verification Profile. Supports pagination and ordering. ```APIDOC ## GET /api/v1/verification-profiles/{verificationProfileId}/sessions ### Description List Sessions created for a specific Verification Profile. ### Method GET ### Endpoint /api/v1/verification-profiles/{verificationProfileId}/sessions ### Parameters #### Path Parameters - **verificationProfileId** (string, uuid) - Required - The unique identifier of the Verification Profile. #### Query Parameters - **OrderBy** (SessionOrdering) - Optional - The field by which sessions should be ordered. Possible values: Created, Updated, State. - **OrderDirection** (OrderDirection) - Optional - The direction of ordering. Possible values: Ascending, Descending. - **PageSize** (integer, int32) - Optional - The number of items to return per page. Must be between 1 and 50. - **Page** (integer, int32) - Optional - The page number to return. Starts at 1. ### Response #### Success Response (200) Returns a ListSessionsResponse object containing the list of sessions. #### Error Responses - **400** - Bad request. Returns a ProblemDetails object. - **401** - Unauthorized. Returns a ProblemDetails object. ``` -------------------------------- ### Activity Result API: Initialize TrinsicUI and Launch Session Source: https://docs.trinsic.id/reference/ui-android Use this Java snippet to initialize TrinsicUI unconditionally in onCreate and launch a session. The callback receives the session ID and cancellation status. Call launchSession with the launch URL to start the session. ```java private TrinsicUI trinsicUi; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // You must ALWAYS instantiate TrinsicUI unconditionally during `onCreate` trinsicUi = new TrinsicUI(this, result -> { // This callback will be called when a launched Session completes or is canceled by the user String sessionId = result.getSessionId(); boolean canceled = result.getCanceled(); // Call your backend to handle Session results }); } private void launchSession(String launchUrl) { trinsicUi.LaunchSession(this, launchUrl); } ``` -------------------------------- ### GET /api/valpha/verification-profiles Source: https://docs.trinsic.id/reference/listverificationprofiles Lists the verification profiles for the current organization and environment. Supports pagination via page and pageSize query parameters, and optional filtering by geography. ```APIDOC ## GET /api/valpha/verification-profiles ### Description List the verification profiles for the current organization and environment. ### Method GET ### Endpoint /api/valpha/verification-profiles ### Parameters #### Query Parameters - **page** (integer, int32) - Optional - Page number to retrieve. Minimum 1, maximum 2147483647. Default: 1. - **pageSize** (integer, int32) - Optional - Size of the list to be returned. Accepted range from 1 to 100. Default: 20. - **geography** (string) - Optional - Filter by data-residency geography. Accepted values: "US", "EU" (case-insensitive). Omit to include all geographies. ### Response #### Success Response (200) Returns a ListVerificationProfilesResponse object containing the list of verification profiles and pagination metadata. #### Error Responses - **400** - Bad request. Returns a ProblemDetails object. - **401** - Unauthorized. Returns a ProblemDetails object. - **403** - Forbidden. Returns a ProblemDetails object. - **500** - Internal server error. Returns a ProblemDetails object. ``` -------------------------------- ### GET /v1/redirect_uris Source: https://docs.trinsic.id/reference/list Lists all redirect URIs within the environment. Returns a paginated list of redirect URIs and a flag indicating if more pages are available. ```APIDOC ## GET /v1/redirect_uris ### Description Lists all redirect URIs within the environment. Returns a paginated list of redirect URIs and a flag indicating if more pages are available. ### Method GET ### Endpoint /v1/redirect_uris ### Parameters #### Query Parameters - **more** (boolean) - Optional - Indicates if there are more pages to retrieve. If true, the response contains additional pages. ### Request Example No request body required. ### Response #### Success Response (200) - **uris** (array of RedirectUriResponse) - List of redirect URIs within the environment. - **more** (boolean) - Whether there are additional pages of URIs to retrieve. #### Response Example { "uris": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "uri": "https://example.com/callback" } ], "more": true } ### Error Handling - **401 Unauthorized** - Invalid or missing bearer token. - **403 Forbidden** - Insufficient permissions. - **404 Not Found** - Resource not found. - **500 Internal Server Error** - Unexpected server error. ``` -------------------------------- ### GET /api/v1/verificationprofiles Source: https://docs.trinsic.id/reference/listverificationprofiles Retrieves a list of verification profiles. The response includes an array of verification profile objects and a boolean indicating whether more pages are available. ```APIDOC ## GET /api/v1/verificationprofiles ### Description Retrieves a list of verification profiles. The response includes an array of verification profile objects and a boolean indicating whether more pages are available. ### Method GET ### Endpoint /api/v1/verificationprofiles ### Parameters #### Query Parameters - **more** (boolean) - Optional - Whether there are additional pages of verification profiles to retrieve. ### Request Example No request body required. ### Response #### Success Response (200) - **verificationProfiles** (array of VerificationProfileResponse) - List of verification profiles. - **more** (boolean) - Whether there are additional pages of verification profiles to retrieve. #### Response Example { "verificationProfiles": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "alias": "string", "brandName": "string", "externalId": "string", "geography": "US", "logoUrl": "string", "primaryColor": "string", "enabledProviders": ["string"], "sessionExpiration": "string", "isProductionUsage": true } ], "more": true } #### Error Response (500) - **type** (string) - A URI reference that identifies the problem type. - **title** (string) - A short, human-readable summary of the error. - **status** (integer) - The HTTP status code returned for the request. - **detail** (string) - A human-readable explanation specific of the problem. - **instance** (string) - A URI reference that identifies the specific occurrence of the problem. #### Error Example { "type": "https://tools.ietf.org/html/rfc7231#section-6.6.1", "title": "Internal Server Error", "status": 500, "traceId": "00-982607166a542147b435be3a847ddd71-fc75498eb9f09d48-00" } ### Authentication Bearer token required. Use Trinsic Connect API Key. ``` -------------------------------- ### List Sessions - OpenAPI definition Source: https://docs.trinsic.id/reference/listsessions Complete OpenAPI definition for listing sessions, including parameters like verificationProfileId, OrderBy, OrderDirection, PageSize, and Page, along with response schemas and example error formats. ```json { "openapi": "3.0.4", "info": { "title": "Trinsic API", "version": "v1", "x-swaggerexclude": "External" }, "servers": [ { "url": "https://api.trinsic.id", "description": "Production server" }, { "url": "https://api.eu.trinsic.id", "description": "Production server (EU data residency preview)" } ], "paths": { "/api/v1/verification-profiles/{verificationProfileId}/sessions": { "get": { "tags": [ "Sessions" ], "summary": "List Sessions", "description": "List Sessions created for a specific Verification Profile", "operationId": "ListSessions", "parameters": [ { "name": "verificationProfileId", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "name": "OrderBy", "in": "query", "description": "The field by which sessions should be ordered", "schema": { "allOf": [ { "$ref": "#/components/schemas/SessionOrdering" } ], "example": "Created", "x-enumDescriptions": { "Created": "Order sessions by their creation date", "Updated": "Order sessions by the date their state last changed", "State": "Order sessions by their state" } }, "example": "Created" }, { "name": "OrderDirection", "in": "query", "schema": { "allOf": [ { "$ref": "#/components/schemas/OrderDirection" } ], "example": "Descending", "x-enumDescriptions": { "Ascending": "", "Descending": "" } }, "example": "Descending" }, { "name": "PageSize", "in": "query", "description": "The number of items to return per page -- must be between `1` and `50`", "schema": { "maximum": 50, "minimum": 1, "type": "integer", "format": "int32", "example": 50 }, "example": 50 }, { "name": "Page", "in": "query", "description": "The page number to return -- starts at `1`", "schema": { "maximum": 2147483647, "minimum": 1, "type": "integer", "format": "int32", "example": 1 }, "example": 1 } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/ListSessionsResponse" } }, "application/json": { "schema": { "$ref": "#/components/schemas/ListSessionsResponse" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ListSessionsResponse" } } } }, "400": { "description": "Bad request", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" }, "example": { "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "Bad Request", "detail": "This feature is not supported for your configuration", "status": 400, "traceId": "00-3fcbc632c5caaca825849d495c62d7b0-09a3500f89acbbcc-00", "instance": "/api/v1/sample-request-path", "errors": { "PropertyName": [ "Specific error description for property" ] } } } } }, "401": { "description": "Unauthorized", "content": { "application/problem+json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" }, "example": { } } } } } } } } } ``` -------------------------------- ### Register custom scheme redirect URL with Trinsic Source: https://docs.trinsic.id/reference/ui-android Example redirect URL to register with Trinsic on the Dashboard. The wildcard (*) allows any path, and the triple slash is required for a valid custom scheme URL. ```text acme-corp-shopping-app-trinsic-redirect:///* ``` -------------------------------- ### Load @trinsic/web-ui via CDN (unpkg) Source: https://docs.trinsic.id/reference/ui-web Include the library via a script tag from unpkg. ```html