CSC207-fiveguys / music-java-app

MIT License
1 stars 1 forks source link

Current API Calls Yield 401 Response in Next and Href fields #15

Open bryjjch opened 11 months ago

bryjjch commented 11 months ago

Describe the bug When calling a search to the Spotify API, the href and next fields yield a 401 response, which is bizarre. We have a valid access token from our request token method, and this access token works in all other queries but yields a 401 response in our href and next fields. A 401 response signifies that our access token is invalid.

To Reproduce Steps to reproduce the behavior:

  1. Go to Main and create a new spotifAPItemp object.
  2. Call the request token method and use that token to call the search method using "drake" as your query (for example).
  3. Scroll down to the console and click on any of the next or href links.
  4. Observe that it takes you to a 401 response.

Expected behavior Href should yield a link to the Web API endpoint returning the full result of the request, while next should take you to the next page of items in your request. This should not yield a 401 response as our search request does in fact yield all other elements of the 200 response.

Screenshots Screenshot 2023-11-25 at 5 38 06 PM

Additional context All other components of the request work, as it yields all artist and track information. The problem is isolated solely in the href and next fields.