Form Flow
Integrations
APIs
KwikID API Integration Guide
Environments
KwikID provides two environments for integration:
UAT Environment
- Base URL:
https://<YOUR-DOMAIN>.<ENV>.getkwikid.com
- Used for testing and development
- Sandbox environment with test data
Production Environment
- Base URL:
https://<YOUR-DOMAIN>.<ENV>.getkwikid.com
- Used for live transactions
- Handles real user data
Note: Replace
<YOUR-DOMAIN>
from SaaS portal and<ENV>
with eithertest
for UAT orapp
for Production in all example endpoints below. e.g. BASE-URL = company-domain.test.getkwikid.com
Authentication
Before making any API calls, you'll need to generate an authentication token.
Generate Authentication Token
Request Headers
Request Body
Example Request
Response
The API will return an authentication token that should be used in subsequent requests.
Send Link API
Send a link to a user for various purposes like authentication or verification.
Request Headers
Request Body Parameters
Parameter | Type | Description |
---|---|---|
user_id | string | Unique identifier for the user |
phone_number | string | User's phone number |
session_type | string | Type of session to create |
origin | string | Origin of the request |
send_notification | string | Whether to send notification |
link_type | string | Type of link to send |
extras | object | Additional parameters |
Example Request
Get Session Details
Retrieve details about a specific session.
Request Headers
Path Parameters
Parameter | Type | Description |
---|---|---|
session_id | string | The ID of the session to retrieve |
Example Request
Environment Variables
For easier environment management, consider using environment variables in your application:
Error Handling
All endpoints may return the following HTTP status codes:
Status Code | Description |
---|---|
200 | Success |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
500 | Internal Server Error |
Security Considerations
- Always store authentication credentials securely
- Use HTTPS for all API calls
- Implement proper error handling
- Don't expose authentication tokens in client-side code
- Implement rate limiting in your applications
- Use appropriate credentials for each environment
- Never use production credentials in UAT environment
Best Practices
- Cache authentication tokens appropriately
- Implement retry logic with exponential backoff
- Log all API interactions for debugging
- Validate all input before sending to the API
- Keep your integration code modular and maintainable
- Test thoroughly in UAT before moving to production
- Use environment variables to manage different endpoint URLs
- Implement proper error handling for each environment
Environment-Specific Configurations
Create separate configuration files for each environment: