Skip to main content

AuthTokenResponse

type AuthTokenResponse = {
accessToken: string;
expiresIn?: number;
refreshToken?: string;
scope?: string;
tokenType: string;
};

Response from a successful OAuth2 token exchange.

See​

https://developer.todoist.com/api/v1/#tag/Authorization/OAuth

Properties​

accessToken​

accessToken: string;

expiresIn?​

optional expiresIn: number;

Access token lifetime in seconds.


refreshToken?​

optional refreshToken: string;

Refresh token for use with refreshAuthToken.

Only present when the OAuth app has refresh tokens enabled — the default for new apps, and immutable once on. Apps without it receive a long-lived access token and no refresh token.


scope?​

optional scope: string;

Space-separated granted scopes, when returned.


tokenType​

tokenType: string;