auth.solveCheckpoint
Solve a checkpoint challenge by submitting an OTP / 2FA code (or the special value TRY_ANOTHER_WAY to switch challenge method).
Prerequisites
- A Curviate API key, passed as
apiKeywhen you construct the client. Authentication and accounts shows how to create one. - A connected LinkedIn account. This call takes a real account id owned by your tenant; a placeholder is rejected. Authentication and accounts covers connecting one, and accounts.list returns the
account_idof each account already connected.
Signature
solveCheckpoint(accountId: string, body: AuthSolveCheckpointBody): Promise<AuthSolveCheckpointResult>Example
import { Curviate } from "@curviate/sdk";
const curviate = new Curviate({
apiKey: "cvt_live_...",
baseUrl: "https://api.curviate.com",
});
const result = await curviate.auth.solveCheckpoint("acc_YOUR_ACCOUNT_ID", { code: "in-app -> 2FA" });
console.log(result.account_id);Parameters
| Name | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The account whose connect/reconnect is mid-flight (returned with the 202 checkpoint_required response). |
code | string | Yes | The OTP / 2FA verification code. Special value TRY_ANOTHER_WAY switches the challenge type (e.g. in-app -> 2FA). |
Returns
Resolves to AuthSolveCheckpointResult. Top-level fields: object, account_id, status, seat_id, attached_seat_id, recovered.
Error codes
| Code | What it means, and what to do |
|---|---|
UNAUTHORIZED | The API key is missing, malformed, or revoked. Check the key you passed to the client. |
INVALID_REQUEST | A parameter failed validation. The message names the offending field; fix the request rather than retrying it. |
RATE_LIMIT_ACCOUNT | This account's own quota is exhausted. Wait for the window in the Retry-After header, then retry. |
RATE_LIMIT_TENANT | The tenant-wide quota is exhausted across all accounts. Slow the whole workload, not just this call. |
PLATFORM_RATE_LIMIT | LinkedIn is throttling this account. Back off well beyond the hinted delay; sustained pressure risks the account. |
PLATFORM_ERROR | A transient upstream failure. Retry once with backoff before treating it as a real error. |
ACCOUNT_NOT_FOUND | No connected account with that id belongs to this tenant. List your accounts to get a current id. |
CHECKPOINT_ALREADY_RESOLVED | The challenge is already solved. Poll for the account's status instead. |
CHECKPOINT_EXPIRED | The challenge timed out. Request a fresh one and solve it promptly. |
CHECKPOINT_INVALID_CODE | The code was wrong. Ask the account owner for the current one and resubmit. |
CHECKPOINT_MAX_ATTEMPTS | Too many wrong codes. Restart the connect flow from the beginning. |
CHECKPOINT_NOT_FOUND | No challenge is pending for that account. Start the connect flow again. |
CHECKPOINT_UNSUPPORTED | This challenge type cannot be solved through the API. Sign in on LinkedIn directly first. |
CONNECTION_IN_PROGRESS | A connection attempt for this LinkedIn account is already open. Wait for it to finish or expire before starting another. |
LINKEDIN_AUTH_FAILED | LinkedIn rejected the credentials. Confirm them with the account owner. |
LINKEDIN_COOKIE_INVALID | The session cookie is expired or invalid. Supply a fresh one, or connect with credentials. |
LINKEDIN_RATE_LIMITED | LinkedIn is rate limiting the sign-in itself. Wait substantially longer before retrying. |
LINKEDIN_SERVICE_UNAVAILABLE | LinkedIn is unavailable, or the resource is still being prepared upstream. Retry with backoff. |
PREMIUM_CONFLICT | LinkedIn allows only one individual Premium subscription per profile. Use a second seat, or pair the enable with a disable in the same call. |
REAUTH_REQUIRED | A cookie replay cannot change an account's scope. Re-authenticate with credentials instead. |
RESOURCE_NOT_FOUND | The id in the path does not exist, or is not visible to this account. Re-read it from the list endpoint that produced it. |
Every code above is a stable CurviateError.code you can branch on. The full list, the response envelope, and retry semantics are in the Error codes reference.
Next steps
- Authentication and accounts: connect a LinkedIn account. An empty account list means the key works and nothing is connected yet.
auth.getSession: Poll a credential connect session by its account id, a pure status read that makes no external call and does not itself complete the connection.auth.intent- SDK Quick Start: installation, the client, account scoping, and pagination.