When building onboarding flows that require identity verification, hardcoding a list of supported platforms can lead to a brittle user experience. If a service becomes temporarily unavailable or if you expand your verification suite, your UI might offer options that result in failed requests. By integrating the Services List API, you can create a dynamic interface that adapts to the current availability of your verification services.
Why Dynamic Service Discovery Matters
Rather than assuming platform availability, a robust integration fetches the current state of supported services directly from the API. This ensures that your frontend only displays buttons or inputs for services that are currently active, reducing friction for your users and preventing unnecessary API calls to inactive endpoints.
Step 1: Fetching Available Services
To begin, your application should perform a GET request to the /v1/services endpoint. This call returns the list of all supported service types along with their current operational status.
Conceptual Implementation
// Conceptual: Fetching current service availability
async function getAvailableServices() {
const response = await fetch('https://api.ekycpro.com/v1/services');
const documentedResult = await response.json();
if (documentedResult.success) {
return documentedResult.services;
}
return [];
}
Step 2: Normalizing the UI State
Once you have retrieved the list of services, you can filter them based on the enabled boolean flag. This allows you to map your UI components—such as registration-check buttons for Facebook, Instagram, or Netflix—to the actual availability of the backend.
-
Filter by
data_type: Ensure your UI only presents the relevant verification input (phone or email) based on the service requirements. -
Toggle Visibility: Use the
enabledfield to conditionally render or disable specific UI elements.
Step 3: Handling API Constraints
When implementing this workflow, keep in mind that the API has rate limits that restrict requests per minute and that concurrency is also limited. For production environments, avoid polling the Services List API on every page load. Instead, cache the service list for a reasonable duration or trigger the fetch only when the user initiates the verification stage of your onboarding flow. Please refer to the current API documentation for applicable limits.
Conclusion
By leveraging the Services List API, you shift from a static, hardcoded integration to a resilient, data-driven architecture. This approach ensures your onboarding flows remain accurate and responsive to changes in service availability, providing a smoother experience for your users. For further details on integrating these signals, consult the official documentation.
This article was drafted with AI assistance and reviewed before publishing.
Top comments (0)