Cannot create playlist on spotify

  static async savePlaylist(playlistName, playlistTracks) {
    if (!playlistName || !playlistTracks) {
    const headers = { Authorization: `Bearer ${accessToken}` };
    let userId = '';

    try {
      const response = await fetch('', {
      const jsonResponse = await response.json();
      userId =;

      const payload = {
        method: 'POST',
        Authorization: `Bearer ${accessToken}`,
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ name: 'Test Playlist', public: false })

      const playlist = await fetch(

      console.log(await playlist.json());
    } catch (err) {

Hi All,
This is my Spotify component… Everything is working fine so far except when i make a request to create a playlist im getting a ‘No Token’ error… Even though my token has worked for getting my userId and everything else so far… I think my request may be put together wrong or something?? Any help is appreciated… And Merry Christmas to all