Skip to main content
POST
/
v2
/
link
/
init
Initialize a Link session
curl --request POST \
  --url https://api.ofauth.com/v2/link/init \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --data '
{
  "clientAppId": "<string>",
  "mode": "redirect",
  "options": {
    "returnRawSession": true
  },
  "redirectUrl": "<string>",
  "origin": "<string>",
  "clientReferenceId": "<string>",
  "connectionId": "<string>"
}
'
{
  "mode": "hosted",
  "url": "<string>",
  "expiresAt": "<string>"
}

Authorizations

apiKey
string
header
required

Your OFAuth API key for authenticating requests.

Body

application/json
clientAppId
string

Client app id.

Pattern: ^app_[a-zA-Z0-9]+$
mode
enum<string>
deprecated

Optional mode hint when clientAppId is omitted. Migrate to explicit clientAppId and configure type on the client app.

Available options:
redirect,
embed,
hosted,
whitelabel
options
object
deprecated

Optional session flags. Migrate to client app configuration and omit this field.

redirectUrl
string<uri>

URL to redirect to after completion. URL must be included in the client app settings. If omitted, Link uses the default redirect URI from the resolved client app when available.

origin
string<uri>
deprecated

Optional embed origin override. Migrate to explicit clientAppId with allowed origins configured on the client app.

clientReferenceId
string

Your internal reference ID for webhook correlation.

connectionId
string

Existing connection ID to reconnect.

geolocation
object

Response

Link session initialized successfully

mode
enum<string>
required
Available options:
hosted
url
string
required

URL to redirect the user to

expiresAt
string
required

ISO timestamp when the session expires