Get a result
Deciding what to do once a result is ready is similar to launching the verification. First, you must connect to your Result Endpoint
to decide the flow's next step. And finally, based on your server's response, you show the corresponding UI and process the result accordingly.
Step 1: Defining the next step
Use the closure you provided to VeriphOneView
in the previous step to trigger your request to the Result Endpoint
. Here's an example of how you would do so assuming you have a method called fetchVerificationResult
that makes the request to your endpoint and another one called resetFlow
that restarts the verification flow:
import VeriphOne
VeriphOneView(sessionUuid: sessionUuid, apiKey: apiKey) { result in
// Dismiss the view as needed
if let result = result {
// Make a request to the Result Endpoint
fetchVerificationResult()
} else {
// In this example, we assume the user cancelled the verification
resetFlow()
}
}
Step 2: Update your UI
Once your server responds, you can use the verification result to follow one of these paths:
- Show an error if the verification process was unsuccessful.
- If the user verified their number correctly, move to the next step of the journey.
Next steps
Now that your implementation is complete, you can add phone verification to more flows within your app or integrate the SDK with other platforms.
Customization
If you haven't already, we recommend customizing your API key so that the UI matches your brand. Also, consider creating multiple API keys for your and your team's different environments.
Go to styling guide 🎨
Support
Questions? Comments? Something is missing? If you have questions, Contact us. We welcome your feedback and suggestions.