0
votes

I am trying to successful complete a spotify auth flow in postman, where I get an access token, and make a request to create a new playlist.

So the first step is making a get request to the auth url, logging in, and getting an access token. My current auth url looks like this:

https://accounts.spotify.com/authorize?client_id=5a576333cfb1417fbffbfa3931b00478&response_type=token&redirect_uri=https://www.martinbarker.me/popularify&scope=playlist-modify-public

Where I have my client_id, response_type, redirect_uri, and scope.

If I go to that URL and log in, It redirects to my site with access token in the url:

https://www.martinbarker.me/popularify#access_token=BQCBaKNSumA9ltCmXV17jf-cyIxA8UlNWTgFfvV8sQz1NcYTJGahGVqTB4ijcpp5HyIL0zXyreQq-4WoP7WHR08ql4iZSI93_GSaxU9RAEFZpGCmOFK5wR3FMzwSEs5fS20H-z5V46ObMI9uUi9k10iAxjaZW_3eQbICE0QJJjDOWZIh&token_type=Bearer&expires_in=3600

So my access_token value is

BQCBaKNSumA9ltCmXV17jf-cyIxA8UlNWTgFfvV8sQz1NcYTJGahGVqTB4ijcpp5HyIL0zXyreQq-4WoP7WHR08ql4iZSI93_GSaxU9RAEFZpGCmOFK5wR3FMzwSEs5fS20H-z5V46ObMI9uUi9k10iAxjaZW_3eQbICE0QJJjDOWZIh

If I make a postman request to '' with the correct data and token set as the bearer token in the authorization tab I get a 404 error.

I tried running the api line online here too and got a 404 error in the inspect element console as well:

https://developer.spotify.com/console/post-playlists/?body=%7B%22name%22%3A%22New%20Playlist%22%2C%22description%22%3A%22New%20playlist%20description%22%2C%22public%22%3Afalse%7D

enter image description here

is there some other way I could test my auth? the fact that im getting a 404 error on both the spotify site and my postman test confuses me

1

1 Answers

0
votes

fixed by using the spotify website developer console for testing making api requests