Skip to content

Function: refreshOAuth2Token() ​

ts
function refreshOAuth2Token(params): Promise<OAuth2TokenResponse>;

Defined in: src/core/oauth/helpers.ts:120

Refresh an access token.

Atlassian rotates the refresh token on every call: persist the one you get back and drop the old one, or the next refresh fails.

Parameters ​

ParameterTypeDescription
params{ clientId: string; clientSecret: string; fetch?: FetchLike; refreshToken: string; }-
params.clientIdstring-
params.clientSecretstring-
params.fetch?FetchLikeThe fetch to reach Atlassian by. Defaults to the global one.
params.refreshTokenstring-

Returns ​

Promise<OAuth2TokenResponse>