Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Spotify API not returning correct album info using my App Client ID & Secret

Spotify API not returning correct album info using my App Client ID & Secret

 

Plan

Premium

 

Country

United States

 

Device

Any — but especially when coding on my MacBook Air w/ M2 Apple Siclicon Chip, 24 GB of RAM, and Mac OS Sonoma v14.2.1

 

Operating System

Any — but seen when coding on my 

 

My Question or Issue


Hello — 

 

I'm trying to code a spotify music app as part of an online video training in using Astro and HTMX (see — https://www.youtube.com/watch?v=C5DHnG8W0ts).

 

I am doing this on a MacBook Air w/ an M2 Apple Silicon Chip, 24 GB RAM, and Mac OS Sonoma v14.2.1. You can see the code I've been trying in this GitHub Repository — https://github.com/faddah/lets-learn-htmx/. I have a Spotify Individual Premium account.

 

As part of this, in the https://developer.spotify.com/dashboard/ portal, I created an app to get a Spotify Developer Client ID & Client Secret for this app I'm creating.

 

When I try and just retrieve album information on an artist, instead fo getting an artist and their albums like "The Beatles," "The Rolling Stones," "Beyoncé" or "Lissie," it comes back with a bunch of generic data, with the Artists' name saying it's —

 

"name": "Capstan",

 

... instead of the artist I was searching for, like "The Beatles," etc. (see attached Screen Shot).


I have tried deleting the App I created in the https://developer.spotify.com/dashboard/ portal and re-creating it to get a new Spotify Developer Client ID & Secret and then swapping out the new ones of those for what was in my `.env` file in my project. I restarted my Astro dev server and tried again to search for popular artists, but got the same result with `Capstan` for the artist name.


If you could please help me out with this blocking issue as to why I'm not getting back any real artist information from Spotify on this, even with a Spotify Individual Premium account and a Spotify Developer Client ID & Secret, I would be very grateful.


best,


faddah wolf
portland, oregon, u.s.a.
GitHub repository for this code: https://github.com/faddah/lets-learn-htmx/

Screenshot 2024-01-03 at 12.57.27.png
Reply
2 Replies

I think the issue may be with your query and not your credentials. Can you share the query you're using?

Hello ZackAttax — thank you very much for responding.

 

As stated in my original query, the code for this can be found in my GitHub repository, here 👉 https://github.com/faddah/lets-learn-htmx/. the code calling it is in src/pages/songs.astro file, which imports the getAlbums() function from the src/lib/spotify.ts file. And again, you watch Jason & Jack implement this code in the instructional video, at this time point  👉 https://www.youtube.com/watch?v=C5DHnG8W0ts&t=36m45s

 

Does that help and is that what you're looking for? I do appreciate the help and would like to get this resolved and get back to continuing the instructional / tutorial video. Please let me know and thank you again.

 

best,


faddah wolf
portland, oregon, u.s.a.
GitHub repository for this code: https://github.com/faddah/lets-learn-htmx/

Suggested posts

Staff
Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

Staff
ModeratorStaff / Moderator/ 3 years ago  in Social & Random

Type a product name