Skip to main content
POST
Exchange a code or refresh a token

Body

grant_type
enum<string>
required
Available options:
authorization_code
code
string
required

Code from the redirect. Valid 5 minutes, single use.

Example:

"lnoc_EXAMPLEcodeNotReal"

redirect_uri
string<uri>
required

Must exactly equal the redirect_uri used in the authorize step.

code_verifier
string
required

The PKCE verifier whose S256 hash was sent as code_challenge.

Example:

"dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"

Response

Token pair.

access_token
string
required

Prefix lna_.

refresh_token
string
required

Prefix lnr_. Replaces the previous refresh token.

token_type
enum<string>
required
Available options:
Bearer
expires_in
integer
required

Access token lifetime in seconds (3600).

Example:

3600

refresh_expires_in
integer
required

Refresh token lifetime in seconds (2592000 = 30 days).

Example:

2592000

scope
string
required

Space-separated granted scopes.

Example:

"journal:read"