Skip to content
This repository has been archived by the owner on Jul 4, 2020. It is now read-only.

Get Spotify Codes from the API #519

Closed
gesteves opened this issue May 7, 2017 · 17 comments
Closed

Get Spotify Codes from the API #519

gesteves opened this issue May 7, 2017 · 17 comments

Comments

@gesteves
Copy link

gesteves commented May 7, 2017

This might already be on your roadmap, but just in case: I'd love to be able to get the Spotify Code for any given album, artist, playlist or track via the API, either by including the code image in the album/artist/track/playlist objects in API calls (similar to the images array), or by calling a separate endpoint to fetch it.

@hughrawlinson
Copy link
Contributor

That sounds like a great feature request! Could you share your use case please?

@gesteves
Copy link
Author

gesteves commented May 8, 2017

Sure thing. I've been messing with the recommendations endpoint to try to build a Slack bot that takes some tracks, artists, and/or genres and builds a playlist with recommendations based on those seeds, and I thought it'd be helpful if the output that is posted to Slack included the Spotify Code for the generated playlist as an image. I could just link to the playlist, but I'm sure I'm not the only one who uses Spotify primarily on mobile, so being able to scan the code with my phone would be super helpful.

@webserviceXXL
Copy link

Just searched for a Spotify Code API and found this thread. Really would love this feature too!

@bensleveritt
Copy link

I'm looking to display the code on a speaker system in a public space so that others can scan tracks they like and take them away with them.

@christophermh44
Copy link

Another use case: I am updating a player for my webradio, I wanted to put this code below the album cover.

@tennisrodman
Copy link

Is there anyone to know if this is on the roadmap or not?

@AlbertMN
Copy link

+1

@Ryan-Sheehan
Copy link

Bump this

@zanona
Copy link

zanona commented May 18, 2018

Hey guys, react to the initial request with a thumbs up so the devs can measure how much this is being requested. — I would love to be able to use this as well.

@bih
Copy link
Member

bih commented Jul 27, 2018

Hey folks!

As per our new developer support process, any feature requests that have no plans to be considered in the next 6 months will be closed as wontfix.

In this particular case, there is work needed for Spotify Codes in order to release them in an Web API. I cannot go into details, but there is no plans to consider implementing this over the next 6 months. However, I do agree it is a valid suggestion for the Web API.

We encourage you and other members of the community to continue to share use cases and your support for this feature, as it helps us prioritize features going forward. You should be able to comment on this issue even after it is closed. We will also post updates here relating to this suggestion as and when they happen.

Hope this clears things up. Cheers 👍

@bih bih closed this as completed Jul 27, 2018
@bih bih added the wontfix label Jul 27, 2018
@LukyVj
Copy link

LukyVj commented Feb 10, 2020

Hello, is it still not a thing? I'm interested as well to get the spotify codes.

@Rickgrendel
Copy link

Hello for people still interested in this I have a (possible) solution. Use this URL:

https://scannables.scdn.co/uri/plain/png/000000/white/640/spotify:playlist:0qtAGoh3i4qOdw0pKaFjMz

with this formatting:

https://scannables.scdn.co/uri/plain/[format]/[background-color-in-hex]/[code-color-in-text]/[size]/[spotify-URI]

@zanona
Copy link

zanona commented Apr 23, 2020

That's awesome!! Thanks so much for sharing this @Rickgrendel

@LukyVj
Copy link

LukyVj commented Apr 23, 2020

Wow, thanks, that can indeed be a solution!

@1deadpixl
Copy link

1deadpixl commented May 1, 2020

Hello for people still interested in this I have a (possible) solution.

@Rickgrendel This is awesome! Thanks for sharing. Is the source code available for this? Or can you share any reference for creating the Spotify code? I thought this might be possible to do locally just using the Spotify URI.

@hjstn
Copy link

hjstn commented May 14, 2020

Hello for people still interested in this I have a (possible) solution.

@Rickgrendel This is awesome! Thanks for sharing. Is the source code available for this? Or can you share any reference for creating the Spotify code? I thought this might be possible to do locally just using the Spotify URI.

This looks like what the official Spotify Codes website uses behind-the-scenes.

Actually, if you set the generator to use SVG, and have a look at how the code is generated, there's a bit to be learned. The height range of each bar is between 11.00 and 60.00 inclusive, with every 7th pixel being valid (so 11, 18, 25, 32, 39, 46, 53, 60, these eight possible values). With 23 bars, it looks like the Spotify Code encodes the URI somehow in this format.

I'm not sure how it does that, but perhaps this would be useful to work off of.

@1deadpixl
Copy link

Hello for people still interested in this I have a (possible) solution.

@Rickgrendel This is awesome! Thanks for sharing. Is the source code available for this? Or can you share any reference for creating the Spotify code? I thought this might be possible to do locally just using the Spotify URI.

This looks like what the official Spotify Codes website uses behind-the-scenes.

Actually, if you set the generator to use SVG, and have a look at how the code is generated, there's a bit to be learned. The height range of each bar is between 11.00 and 60.00 inclusive, with every 7th pixel being valid (so 11, 18, 25, 32, 39, 46, 53, 60, these eight possible values). With 23 bars, it looks like the Spotify Code encodes the URI somehow in this format.

I'm not sure how it does that, but perhaps this would be useful to work off of.

Thanks for RE summary—it's a great starting point for the creating the Spotify Codes. I realized later that for my application, where I want to give users an easy way to get to the Spotify track listing after reading the track info on my dashboard, I could generate a QR Code with the Spotify URL. Users are able to scan the QR Code and it deep links to the Spotify app on their device. This is for personal use and my iPhone camera will scan QR Codes which makes it very quick—not sure about the process for non-iOS devices, but I imagine it's fairly quick as well. So as an alternative to Spotify Codes, QR Codes work very well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests