Spotify POST request issues API

I am having issues with a POST request to the Spotify API using implicit grant flow:

I am getting this error message when I am trying a POST request:

  "error": {
    "status": 401,
    "message": "No token provided"

The thing is I am passing in an access token by making a headers variable and assigning it to the headers for the post request like this:

const headers = {
            Authorization: `Bearer ${accessToken}`
return fetch(`${userId}/playlists`, {
                'headers': headers,
                method: 'POST',
                body: JSON.stringify({'name': name})

This fetch request is the one giving me the error I stated above. How can I fix this?

Here is the headers object right before the fetch:

Here is the link to the GitHub:

This code is in the src/utils/Spotify document