Skip to content
Docs

Creating a Linear OAuth 2.0 application

This guide is part of the Publicus connection catalog. Once you have the credentials, connect the service and Publicus stores them for you.

Distilled from Linear’s own documentation: OAuth 2.0 authentication and OAuth actor authorization. Retrieved 2026-07-03.

Linear highly recommends creating a dedicated workspace for managing the OAuth2 application, because every admin user of the workspace has access to it.

  1. Create a new OAuth2 application at linear.app/settings/api/applications/new and configure the redirect callback URLs to point at the connect form’s callback.
  2. Copy the client ID and client secret from the application.
  3. Authorize by redirecting the user to https://linear.app/oauth/authorize with response_type=code, client_id, redirect_uri, a comma-separated scope list (read is the default and always present; other scopes: write, issues:create, comments:create, timeSchedule:write, admin), and a random state value (recommended — verify it on the callback).
  4. Optional: add actor=app to have all mutations (issues, comments, status changes) performed as the application itself instead of the authorizing user — Linear recommends this for agents and service accounts. The older actor=application mode is deprecated in favor of actor=app. Optional: prompt=consent forces the consent screen every time, useful for letting users connect multiple workspaces.
  5. Optional (PKCE): add code_challenge and code_challenge_method (plain or S256) to the authorize request; the client secret then becomes optional at the token exchange.
  6. Exchange the returned code at POST https://api.linear.app/oauth/token with grant_type=authorization_code, code, redirect_uri, client_id, and client_secret (or code_verifier for PKCE), all as a URL-encoded form body.
  7. Store both tokens from the response: the access token is valid for 24 hours; the refresh token retrieves the next pair. (All OAuth2 apps were migrated to this refresh-token system on April 1, 2026.)
  8. Refresh at the same token endpoint with grant_type=refresh_token — client authentication via HTTP Basic (base64(client_id:client_secret)) or form parameters; PKCE-issued tokens need only client_id. Each refresh returns a new refresh token, with a 30-minute replay grace period if the response is lost.
  9. Call the API: POST https://api.linear.app/graphql with Authorization: Bearer <ACCESS_TOKEN>.
  10. To disconnect, POST https://api.linear.app/oauth/revoke with the token in the token form field (optionally token_type_hint=access_token|refresh_token); 200 means revoked.

Open Connections under Credentials, choose Linear, and pick Linear OAuth 2.0. Publicus asks for exactly the fields listed above and keeps them in your workspace’s secret storage.

See also: Linear in the catalog.

This guide is maintained by Publicus and published under CC BY 4.0.