Overview
The/init endpoint creates a new Link session. It returns a URL that you can redirect the user to (Hosted mode) or load in an iframe/popup (Embed mode).
HTTP Request
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
clientAppId | string | Recommended | Your client app ID (e.g., app_abc123). If omitted, the first matching client app for your environment is used automatically. |
redirectUrl | string | No | URL to redirect to after completion. Must be registered in your client app’s Allowed Redirect URIs. If omitted, uses the first allowed URI from your client app. |
clientReferenceId | string | No | Your own internal ID for this user. Returned in webhooks and query params. |
connectionId | string | No | Provide an existing connection ID to reconnect/re-authenticate that specific connection. |
geolocation | object | No | Override the proxy location for this session. |
geolocation.country | string | Yes* | Country code (e.g., "US"). *Required if geolocation is provided. |
geolocation.state | string | No | State/region code (e.g., "CA" for California). |
The
redirectUrl must be registered in your client app’s Allowed Redirect URIs. Create and configure client apps in your OFAuth dashboard.Response
| Field | Type | Description |
|---|---|---|
url | string | The URL to redirect the user to. |
expiresAt | string | ISO timestamp when this session expires (usually 30-60 minutes). |
Redirect Query Parameters
After Link completes, OFAuth redirects the user to yourredirectUrl with query parameters appended:
On Success
| Param | Description |
|---|---|
status | success |
connection_id | The new or updated connection ID |
client_reference_id | Your reference ID (if provided in init) |
On Cancel
| Param | Description |
|---|---|
status | cancelled |
step | Where the user cancelled: pre-login, authorization, login, or 2fa |
client_reference_id | Your reference ID (if provided) |
On Error
| Param | Description |
|---|---|
status | error |
error_code | Error type: session_expired, invalid_credentials, etc. |
client_reference_id | Your reference ID (if provided) |