Skip to main content
POST

Body

application/json
action
enum<string>
required
Available options:
start
token
string
required

The token of a connect link signed with signLink() (purpose: "connect").

device
object

What the SDK reports about the device. Stored with the connection for support; each value is truncated to 80 characters.

Response

The start data, or the capture outcome (connected or waiting).

captureNonce
string<uuid>
required

Identifies this connect attempt in capture.

clientSecret
string
required

Returned once. Proves in capture that the caller is the SDK instance that started the flow.

provider
string
required
Example:

"chatgpt"

loginUrl
string<uri>
required

Where to send the WebView.

Example:

"https://chatgpt.com/auth/login"

Example:

"chatgpt.com"

The session cookie to watch. The provider may split it into <cookieName>.0, <cookieName>.1, … chunks; concatenate them in order.

Example:

"__Secure-next-auth.session-token"

sessionUrl
string<uri>
required

Fetched from inside the WebView once the cookie is present; its JSON carries accessToken, user.id and user.email.

Example:

"https://chatgpt.com/api/auth/session"

expiresInSeconds
integer
required

Lifetime of the capture credential.

Example:

3600