getMalAccessToken exchanges a MAL authorization code for an access token through PKCE.
It completes the flow started by buildMalAuthorizationUrl using the MalAuthorizationCodeRequest fields and returns a MalTokenResponse consumed by MalCredentials and buildMyAnimeListApi. Transport is shared with RequestOptions.
MalCredentials
buildMyAnimeListApi
The authorization-code fields and optional transport settings; a MalAuthorizationCodeRequest.
The MalTokenResponse for the authenticated session.
An AniLinkApiError or AniLinkNetworkError with sanitized token-request details.
const token = await getMalAccessToken({ clientId, code, codeVerifier });// token.access_token -> pass as MalCredentials.accessToken to buildMyAnimeListApi Copy
const token = await getMalAccessToken({ clientId, code, codeVerifier });// token.access_token -> pass as MalCredentials.accessToken to buildMyAnimeListApi
https://myanimelist.net/apiconfig/references/authorization
getMalAccessToken exchanges a MAL authorization code for an access token through PKCE.
It completes the flow started by buildMalAuthorizationUrl using the MalAuthorizationCodeRequest fields and returns a MalTokenResponse consumed by
MalCredentialsandbuildMyAnimeListApi. Transport is shared with RequestOptions.