Skip to main content
← Data, API & Backend
Data, API & Backend April 12, 2023 · 2 replies

Spotify Connection Can't Get Currently Playing Artist's name

Archived from the Bravo community forum (2021–2026). Some answers may refer to older versions of Bravo.

I'm trying to send a request to Spotify that returns the user data for the Currently Playing Track, particularly the Song name, Artist name and Artist image url. Does anyone know which path(s) to select in order to get these data and bind them to the design?

I'm using the endpoint "https://api.spotify.com/v1/me/player/currently-playing" to get the data and I can receive the data I want by sending the request in the API collection.

Then, to bind the Artist name to my design I selected these paths as shown in the picture below:
.data.item.artists[].name
.data.item.artists[]
.data.item.album.artists[].name
.data.item.album.artists[]

spotify-artist2.PNG

When I go and try to bind the selected data to a text element in my design, they seem to a unselectable (see SS below)

spotify-artist.PNG

However, this only happens some of the time. Sometimes I can select these paths, but the data still won't show when I preview it on Bravo Vision (see <Band Name> in the SS below)

IMG_7442.PNG

On the other hand, I'm able to bind the "Song name" data to my design by just selecting the [ .data.item.name ] path in the API collection. So the only issue is with the "artist name" and "artist image url". 

Can anyone show me the way to bind them to my design?

2 replies

Vincent April 12, 2023

Hi Kaan. In my experience I would assume that you get a list that needs to be binded at an upper level before being able to access its elements. Besides, it seems you retrieve tables ("[ ]") which could explain your problem. Have a look at the result of your test query to confirm that those elements are arrays. I hope it helps... 😅

Kaan April 25, 2023

Thanks a lot Vincent! You're right, I needed to bind the list on an upper level to access it inside the [container]. Now I just need to tweak the layout a little since I cannot bind two table data inside the same container. But I think it'll be okay... Sorry for returning to your comment so late :)

Wrote something in this thread and want it removed? Request removal

Still stuck?

Ask the community on Discord

This archive is read-only. New questions, office hours and product updates now happen in the Bravo Discord.

Join the Discord