spotify-web-api-node icon indicating copy to clipboard operation
spotify-web-api-node copied to clipboard

refreshAccessToken not FOUND

Open iamendy opened this issue 3 years ago • 7 comments

The function for getting refresh tokens is not available in the library.

spotify-web-api-node refreshAccessToken()

Kindly check.

iamendy avatar Feb 23 '22 02:02 iamendy

Hi, you can refresh an access token with refreshAccessToken() but you will have to set the refresh token first with setRefreshToken(refresh_token)

ludwigjo avatar Mar 10 '22 10:03 ludwigjo

I have the same issue, v5.0.2. I've set the refresh token. you can see the code and error below.

    let spotifyApi = new SpotifyWebApi();
    spotifyApi.setRefreshToken(refreshToken);
    spotifyApi.setClientId(process.env.REACT_APP_CLIENT_ID);
    spotifyApi.setClientSecret(process.env.REACT_APP_CLIENT_SECRET);
    return spotifyApi.refreshAccessToken()
                     .then(_ => spotifyApi.getAccessToken());

Uncaught TypeError: spotifyApi.refreshAccessToken is not a function

KaranLala avatar Jun 28 '22 15:06 KaranLala

@KaranLala were you able to resolve this? I'm having the same problem.

kyds3k avatar Oct 25 '22 08:10 kyds3k

@iamendy were you able to resolve this?

kyds3k avatar Oct 27 '22 21:10 kyds3k

@kyds3k Were you able to? Same issue here

GraysonCAdams avatar Mar 15 '23 03:03 GraysonCAdams

@GraysonCAdams Do you mind sharing your implementation?

ludwigjo avatar Mar 15 '23 03:03 ludwigjo

@kyds3k Were you able to? Same issue here

Nope :-( not yet

kyds3k avatar Mar 22 '23 00:03 kyds3k