Skip to main content

Launch a verification

Since our SDK does the heavy lifting and your server handles most of the communication, launching a new verification on your mobile app is quite simple. You only need to create a button or interactive element in your UI that triggers the following flow when the user taps on it:

Step 1: Get a session UUID

The first step is for your app to hit the Start Endpoint provided by your backend. Based on how you or your team decided to implement this endpoint, you might need to pass some parameters for your backend to link the request to a specific user or transaction. Veriph.One doesn't explicitly ask for this to happen in a certain way; you and your team define how to approach this.

tip

We recommend that you pass the user's current locale to this endpoint to ensure that our UI localizes all the texts and elements correctly during the verification flow.

Step 2: Launch the SDK

Assuming the endpoint functions correctly, you should have a valid verification session UUID. Using the code below, you will use this UUID and your iOS or Generic Mobile API Key to instantiate VeriphOneView from our SDK.

import VeriphOne

VeriphOneView(sessionUuid: sessionUuid, apiKey: apiKey) { result in
// Dismiss the view as needed
if let result = result {
// Verification has a result ready (could be successful or failed)
// Connect to your Result Endpoint for further instructions.
// More on this on the next section of the tutorial.
} else {
// Verification failed or was interrupted.
// Option 1: Do nothing.
// Option 2: Ask server for further instructions.
}
}

You need to present VeriphOneView (fullScreenCover is recommended) so that our UI takes over. The user will then be prompted to complete the phone verification process. Our SDK will return a result to your app (through the provided closure) once one is available.