Overview
Authentication in the MetaMap iOS SDK requires two essential parameters to initialize the verification flow:clientId and flowId. These credentials connect your application to your MetaMap account and specify which verification flow to execute.
Required Parameters
Your unique MetaMap client identifier. This authenticates your application with the MetaMap platform and links verification sessions to your account.Where to find it: Available in your MetaMap Dashboard under Settings > API Keys
The identifier for the specific verification flow you want to execute. Each flow defines the verification steps, document types, and user journey.Format: Alphanumeric string (e.g.,
"7e8zf446aa5b5e001a7769d0")Where to find it: Created in your MetaMap Dashboard under Flows sectionBasic Implementation
Here’s how to implement authentication in your iOS application:Swift
Objective-C
Obtaining Your Credentials
Getting Your Client ID
- Log in to your MetaMap Dashboard
- Navigate to Settings > API Keys
- Copy your Client ID (different from your Secret Key)
- Replace
"YOUR_CLIENT_ID"in the code with this value
Keep your Client ID secure. While it’s used in client-side code, it should not be committed to public repositories. Consider using environment variables or secure configuration management.
Getting Your Flow ID
- In your MetaMap Dashboard, go to the Flows section
- Select the verification flow you want to use, or create a new one
- Copy the Flow ID from the flow details
- Replace
"YOUR_FLOW_ID"in the code with this value
Advanced Configuration Options
TheshowMetaMapFlow method accepts additional optional parameters:
Optional configuration ID for custom UI settings and branding.
Optional encryption configuration ID for enhanced data security. Use this to encrypt sensitive verification data with your custom encryption settings.
Security Best Practices
Recommended Approach
Troubleshooting
Invalid Client ID Error
If you receive an authentication error:- Verify the Client ID is correct and copied entirely
- Ensure you’re using the Client ID, not the Secret Key
- Check that your MetaMap account is active
Flow Not Found Error
If the flow doesn’t initialize:- Confirm the Flow ID exists in your dashboard
- Verify the flow is published and not in draft mode
- Ensure the flow is compatible with your SDK version
Next Steps
Verification Flows
Learn about multi-flow support and flow configuration
Metadata
Customize verification with metadata parameters