Skip to main content
Use OAuth when people other than you will sign in to your app: a browser extension, a desktop or mobile app, a web app or an integration. Users approve the scopes you ask for on a Linkvite consent screen, and you get an access token limited to them.

Register your app

In the web app, go to Settings → Developers and create an app. Choose:
  • Public for apps that can’t keep a secret (extensions, desktop, mobile, single-page apps). They authenticate with PKCE alone.
  • Confidential for apps with a server that can keep a client secret.
Add your redirect URI and the scopes the app may request. You get a client ID (and a secret for confidential apps).
Clients that support Client ID Metadata Documents (such as MCP clients) can skip registration: their client_id is an https:// URL that serves their metadata.

Authorization code flow with PKCE

1

Send the user to Linkvite

Create a PKCE verifier and its S256 challenge, plus a random state. Store both, then redirect to the authorization endpoint:
Add prompt=consent to always show the consent screen.
2

Handle the redirect

After the user selects Allow, Linkvite redirects to your redirect_uri with code and state. Check that state matches what you stored.
3

Exchange the code for tokens

A code works once; replaying it revokes the tokens it produced.
4

Call the API

Send the access token as Authorization: Bearer <access_token>.
With the SDKs:

Refresh tokens

Access tokens are short-lived (expires_in, in seconds). Get a new one with the refresh token:
Refresh tokens rotate: each one works once, and the response contains a new one. Store it before using the new access token. Presenting a refresh token that was already used revokes the whole session, and the user has to sign in again. Make sure only one refresh runs at a time (the JavaScript SDK’s oauth.singleFlightRefresher does this).

Sign out

Revoke the refresh token (or the access token) when the user signs out:
Users can also revoke your app’s access from their Linkvite settings.

Resource indicators

Tokens are bound to one resource (RFC 8707): the REST API (https://api.linkvite.io) or the MCP server (https://api.linkvite.io/mcp). Pass resource on the authorization and token requests to choose; without it, the token is for the REST API.

Errors

The token and revocation endpoints return standard OAuth errors: