The client ID of your AniList API application.
The client secret of your AniList API application.
The refresh token from a previous token response.
Optionalsignal: AbortSignal
Optional AbortSignal to cancel the refresh while it is in flight.
A promise that resolves to the token response containing a new access_token. The refresh_token field may be absent when AniList does not rotate it.
An AniLinkApiError when AniList rejects the refresh, for example when the refresh token is invalid or revoked, or an AniLinkNetworkError on transport failure. Errors never include the request body, so the client secret and refresh token are not leaked.
Exchanges a refresh token for a new access token using the refresh-token grant.